Mars + IL2CPP

I get this error when I build the base mars project and starting any template scene with IL2CPP.
Everything works fine in mono since I can disable Managed Stripping Level.

2020/06/10 11:12:52.943 25521 25549 Error Unity NullReferenceException: Object reference not set to an instance of an object.
2020/06/10 11:12:52.943 25521 25549 Error Unity at Unity.XRTools.ModuleLoader.ModuleLoaderCore.LoadModulesWithTypes (System.Collections.Generic.List1[T] moduleTypes) [0x00000] in <00000000000000000000000000000000>:0 2020/06/10 11:12:52.943 25521 25549 Error Unity at Unity.MARS.MARSSession.Awake () [0x00000] in <00000000000000000000000000000000>:0 2020/06/10 11:12:52.943 25521 25549 Error Unity Unity.XRTools.ModuleLoader.ModuleLoaderCore:LoadModulesWithTypes(List1)
2020/06/10 11:12:52.943 25521 25549 Error Unity Unity.MARS.MARSSession:Awake()

We are working on releasing an update, local fix should be adding the [UnityEngine.Scripting.Preserve] attribute to the "
“ConnectDependency” method of “PackageSource/com.unity.xrtools.module-loader/Interfaces/Modules/IModuleDependency.cs” (that way, as you pointed out, the Managed Stripping knowns not to turn this system off).

1 Like