Open foxgunner opened 4 years ago
As stated from here that IL2CPP can only contains generic types up to 7 level.
I found out the solution by adding additional args to the PlayerSetting
Here's the editor script i used
using UnityEditor;
using UnityEditor.Build;
using UnityEditor.Build.Reporting;
public class Il2cppCustomFlag : IPreprocessBuildWithReport
{
public int callbackOrder { get { return 0; } }
public void OnPreprocessBuild(BuildReport report)
{
#if UNITY_IOS || UNITY_ANDROID
ScriptingImplementation backend = PlayerSettings.GetScriptingBackend(BuildPipeline.GetBuildTargetGroup(EditorUserBuildSettings.activeBuildTarget));
if (backend == ScriptingImplementation.IL2CPP)
{
PlayerSettings.SetAdditionalIl2CppArgs("--maximum-recursive-generic-depth=50");
}
}
#endif
}
It will add an additional args --maximum-recursive-generic-depth
and setting its value to whatever you want. In my case i set this to 50
I added a new PR #5 regarding this issue.
Hi, I tried running the Example scene in an Android device. But I am getting the following error when I try to run it.