How to Set Unity Projects for Strix SDK¶
Unity provides plenty of options in Project Settings, and setting some of them appropriately is critical to use Strix Unity SDK in your project.
Managed Stripping Level¶
In Project Settings > Player > Other Settings > Optimization, you will see an option called Managed Stripping Level. As the Unity documentation describes, it is important to choose an appropriate level for your game to serialize and deserialize objects correctly, and Strix Unity SDK performs object serialization frequently.
The Strix Unity SDK assumes Unity’s default setting for Managed Stripping Level, so it is recommended to keep its default value, except for one case: if you are using Unity 2021.2 or later, you are using IL2CPP scripting backend, and your Strix Unity SDK is version 1.4.0 or earlier, you need to change the Managed Stripping Level to Low from its default value Minimal.
Note
The change is needed to avoid a build error related to “MsgPack”, which is produced by IL2CPP.
The Scripting Backend option is in Project Settings > Player > Other Settings > Configuration. It may be always set to IL2CPP or default to IL2CPP, depending on the Unity version and the target platform.
In particular, it is fixed to IL2CPP when your project targets iOS platform.
Note
Strix Unity SDK doesn’t work correctly under any Scripting Backend settings if you build your game with Managed Stripping Level set to High or Medium, because the reflection operations the SDK relies on malfunction.