New Open-Source Unity Packages: Multiplatform Build Settings and More!


A while back, I mentioned in a tutorial that I started splitting up a large Unity project into small Unity packages. I’ve made a significant amount of progress since then, and would love to share the results so far. Note that the majority of these packages are marked preview in case I make changes as I continue working on putting together more tools.

Multiplatform Build Settings

In my opinion, this is probably one of the biggest tool amongst those listed below. Multiplatform Build Settings is an asset and a tool where one can setup build settings for each platform, then by clicking one button, build a Unity game to all of them. Makes building projects a lot quicker and more convenient, especially within that Ludum Dare submission hour!

Also integrates with Web Security package, listed below.

Embed WebGL Template

Many have likely noticed this, but Unity’s WebGL builds aren’t well-made for embedding in web portals like Itch.io, GameJolt, etc. Both the default and minimal settings for WebGL build templates still has borders seeping into the iframe. To fix this, the Embed WebGL Template is an importable set of assets that neatly fits within the iframe the WebGL build is embedded in. The game will even change resolution to fit the screen if through the web portal’s options, the player chooses to full-screen the game. In addition, the template also displays a number indicating how much progress the initial loading process is taking.

Web Security

A common problem when uploading WebGL builds to web portals is that it’s very easy for a nefarious web user to download the source of the build, then re-upload it to another website for profit. The WebLocationChecker script, bundled in the Web Security package, resolves this issue. by retrieving the domain the WebGL build is running on, and matching it to a list of expected domain names. While the script leaves it to the developer on what they want to do if the script indicate the web domain isn’t valid, one built-in option is to automatically redirect the web user to a different website, provided the web portal gives the build permission to do so. For C# developers, this script should be very easy to use: it only takes a few lines to get started.

Cryptography

Last but not least is the Cryptography package, which as its name implies, has a series of tools for encrypting and decrypting data. The highlight is StringCryptographer, an easy-to-use asset that can be used to encrypt and decrypt strings.

Final Notes

There are some other packages I have released, but most of them are libraries intended to support all the packages above. These include:

  • Common – Base library for nearly everything I work on.
  • Web – Base library for web-related packages.
  • Global – Library for scripts with expanded scopes.

I’m slowly working on documenting and unit testing these libraries, but expanding the current tool sets and adding new features are my focus right now.

Categories: Uncategorized

Add a Comment

Your email address will not be published.