MissingMethodException when using il2cpp in Unity 19.3.3

juegopurchase

New member
Hello
I am getting below error when instantiating a prefab that contains Behaviour Tree in scripting backend il2cpp. It works fine for Mono. The error is observed in android only and not in the editor. I am using 2019.3.3 Unity editor

Thanks in advance.

MissingMethodException: Default constructor not found for type UnityEngine.Collision
at System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic) [0x00000] in <00000000000000000000000000000000>:0
at System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) [0x00000] in <00000000000000000000000000000000>:0
at BehaviorDesigner.Runtime.JSONDeserialization.ValueToObject (BehaviorDesigner.Runtime.Tasks.Task task, System.Type type, System.Object obj, BehaviorDesigner.Runtime.IVariableSource variableSource, System.Collections.Generic.List`1[T] unityObjects) [0x00000] in <00000000000000000000000000000000>:0
at BehaviorDesigner.Runtime.JSONDeserialization.DeserializeObject (BehaviorDesigner.Runtime.Tasks.Task task, System.Object obj, System.Collections.Generic.Dictionary`2[TKey,TValue] dict, BehaviorDesigner.Runtime.IVariableSource variableSource, System.Collections.Generic.List`1[T] unityObjects) [0x00000] in <00000000000000000000000000000000>:0
at BehaviorDesigner.Runtime.JSO

The behavior "Behavior" on GameObject “goName” contains no root task. This behavior will be disabled.
 
I am not able to reproduce this. From a fresh project are you able to tell me how to reproduce it?
 
Hello Justin,
Been a long time. How should I import the runtime sources as you have mentioned because the minimum stripping level in Unity for IL2CPP is Low and we can't disable it.
 
Before you import the source you can just remove the Behavior Designer version. Another thing that you can try is to specify the missing objects within a link.xml file.
 
I created the link.xml file and preserved the UnityEngine.Collision type and it worked. The system was able to find the Default Constructor. Compiler had stripped away the Collision class from the build.
 
Top