Unreal Engine modules¶
The system is structured as an Unreal plugin with two additional Unreal modules: one for the editor and one for the runtime. These modules use external libraries for the Mutable runtime, which is a standalonw library with no dependencies.
This is the basic folder structure of an Unreal Engine game that uses Mutable. The hierarchy only shows the relevant folders for Mutable source code.
The folder “source” is optional (and by default not included with all licenses) and it contains the source code of the standalone runtime and tools libraries. These are already included in the “lib” folder as precompiled binaries for each supported platform, with the required headers in the “include” folder.
The “source” folder may also contain the source code for the standalone tools for Mutable. These tools are not required for normal Mutable usage but they can be very helpful to debug and profile your project.
Most of Mutable happens in the plugin described above. However, there are some changes that are required in the engine and tools, than cannot be done from a plugin. These are a small set of changes (usually a handful of lines) and they affect the following files:
- To add an additional cook step to build the CustomizableObject assets:
- To add some texture streaming tweaks for mutable textures:
- To extend some worker thread stack size:
We aim at reducing the number of this engine changes as our development progresses.
Packaging a project¶
When a project is packaged for distribution, Mutable will compile all the relevant CustomizableObject assets. This compilation step will be done with maximum optimisation so it will take longer than compiling an object in the editor. Additionally, the data used by the CustomizableObjects will be prepared for disk streaming. Thanks to this, the memory usage of your project will be kept low regardless how may options you have in your objects.
In order to package a project using Mutable you need to include an additional folder in the packaging process: <YourProject>/Content/MutableStreamedData . You can do this in the DefaultGame.ini file of your project:
or from the project settings in the Unreal editor: