How do I protect my assets when exporting to webview2?

Not favoritedFavorited Favorited 0 favourites
  • 7 posts
From the Asset Store
Versatile shieldpack, usefull for protecting ships or buildings, area-forcefields, creating shockwaves ...
  • Hello everyone, I am now communicating through translation software and hope to understand my intentions。

    ==========================================

    I wanted to export my game as webview2, but it turned out that my assets were in the open air, which was unfriendly and involved some copyright issues, but I couldn't find a way to hide it, so help me!

    Tagged:

  • You can use "Load Image From URL" and fill it with a base64 string, for example:

    "data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MEVBMTczNDg3QzA5MTFFNjk3ODM5NjQyRjE2RjA3QTkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MEVBMTczNDk3QzA5MTFFNjk3ODM5NjQyRjE2RjA3QTkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowRUExNzM0NjdDMDkxMUU2OTc4Mzk2NDJGMTZGMDdBOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowRUExNzM0NzdDMDkxMUU2OTc4Mzk2NDJGMTZGMDdBOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjjUmssAAAGASURBVHjatJaxTsMwEIbpIzDA6FaMMPYJkDKzVYU+QFeEGPIKfYU8AETkCYI6wANkZQwIKRNDB1hA0Jrf0rk6WXZ8BvWkb4kv99vn89kDrfVexBSYgVNwDA7AN+jAK3gEd+AlGMGIBFDgFvzouK3JV/lihQTOwLtOtw9wIRG5pJn91Tbgqk9kSk7GViADrTD4HCyZ0NQnomi51sb0fUyCMQEbp2WpU67IjfNjwcYyoUDhjJVcZBjYBy40j4wXgaobWoe8Z6Y80CJBwFpunepIzt2AUgFjtXXshNXjVmMh+K+zzp/CMs0CqeuzrxSRpbOKfdCkiMTS1VBQ41uxMyQR2qbrXiiwYN3ACh1FDmsdK2Eu4J6Tlo31dYVtCY88h5ELZIJJ+IRMzBHfyJINrigNkt5VsRiub9nXICdsYyVd2NcVvA3ScE5t2rb5JuEeyZnAhmLt9NK63vX1O5Pe8XaPSuGq1uTrfUgMEp9EJ+CQvr+BJ/AAKvAcCiAR+bf9CjAAluzmdX4AEIIAAAAASUVORK5CYII="

    Place it, for example, in "Start of Layout," or you can also load it from JSON, CSV, etc.

  • Same question: the WebView2 exporting option seems quite unprofessional to me. I have my games published on Steam and GOG (exported with NW.js) and at least every asset is "hidden" inside the package.nw file (that is just a zip file, but it not so evident).

    Instead, having all the files in plain sight in the "www" folder with the WebView2 exporting option is quite bad to be honest. Any suggestion or workaround?

  • This is why I chose to go with NW.js. I'd like to export to WebView2 because it's lighter and my game is only supported for Windows, but I don't like seeing all of my art put into a single folder that very easy find (and rip) in the game's files.

  • Hello Ashley, in today update you said to let you know if something is stopping us to export in WV2.

    I think this is the main reason. There's some good option to solve this?

  • The latest release adds a 'Bundle assets' option for the Windows WebView2, macOS WKWebView and Linux CEF export options. This will combine all the exported files in the www subfolder into a single file named assets.dat, meaning it is no longer possible to casually browse the exported files in the install folder. The file is not encrypted, but it should do the job of preventing anyone easily finding the files.

    It's pretty similar to package.nw in NW.js (being a non-encrypted bundle file), but it has the additional advantage of having much better performance. With NW.js package.nw was just a zip file, and NW.js would fully extract it to a temporary folder on startup, which could be too slow to be usable for large projects. With our new export options using assets.dat it does not need to extract anything and can directly read data from that file, so there is no impact to startup time even for very large projects. Also as assets.dat is not a zip file, you can't use the old trick of renaming package.nw to pckage.zip to get at the files, so arguably it's better protected too. So overall I'd say the new export options handle this much better now than NW.js ever did.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • The latest release adds a 'Bundle assets' option for the Windows WebView2, macOS WKWebView and Linux CEF export options. This will combine all the exported files in the www subfolder into a single file named assets.dat, meaning it is no longer possible to casually browse the exported files in the install folder. The file is not encrypted, but it should do the job of preventing anyone easily finding the files.

    It's pretty similar to package.nw in NW.js (being a non-encrypted bundle file), but it has the additional advantage of having much better performance. With NW.js package.nw was just a zip file, and NW.js would fully extract it to a temporary folder on startup, which could be too slow to be usable for large projects. With our new export options using assets.dat it does not need to extract anything and can directly read data from that file, so there is no impact to startup time even for very large projects. Also as assets.dat is not a zip file, you can't use the old trick of renaming package.nw to pckage.zip to get at the files, so arguably it's better protected too. So overall I'd say the new export options handle this much better now than NW.js ever did.

    Wow, cool!!! Thanks for replying

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)