Post-Build Scripting?

I couldn’t find any posts about this topic already, so I apologize if this is already in here some where. I was hoping for input on implementing a sort of post-build “script extender” so people could modify my project without having full access to a decompiled game client.

I’ve honestly never even thought about editing a game after the build, so I figured asking my more experienced comrades here in the forums was a good first step.

In general, where can I learn more about the build processes? Are there ways to keep certain assets from being compounded while only certain parts of code and the engine become a single executable?

The most straight-forward way is to design your game so it collects scripts and assets from outside the build process. You then have to manually find and parse those assets at runtime.

It’s not a trivial thing to do! You have to make the game from the start of to support that kind of thing. To let users expand on the scripting, you have to decide on what language you want them to use, and then have your game able to compile/parse that language on the fly. Lua’s a popular choice for that.

The gains are large. Your game will be moddable! If you do things right, you’ll also be able to change the code of parts of the game while it’s playing.

Unity’s built-in way of handling that is the StreamingAssets magic folder. Everything in there is packaged with your game as-is, and can be modified by the user. The user can also add different assets to that folder. And, of course, you can also have your program put files in there, to allow the user to change things from inside of the engine.

1 Like