UCC supports IL2CPP?

chrisk

Active member
I was curious to how much UCC will be faster compiled using IL2CPP.
It built successfully but this is what I get when I execute the binary(development) complaining about AOT.
Any idea how to fix it?
I used 2019.1 latest and 2.1.4.
Thanks.


PlayerConnection initialized from O:/Unity/TPC2.1.4/Build/TPC2.1.4_Data (debug = 0)
PlayerConnection initialized network socket : 0.0.0.0 55035
Multi-casting "[IP] 192.168.0.9 [Port] 55035 [Flags] 2 [Guid] 3731447347 [EditorId] 1599146209 [Version] 1048832 [Id] WindowsPlayer(Chris-BSE-AMD) [Debug] 0 [PackageName] WindowsPlayer" to [225.0.0.222:54997]...
Started listening to [0.0.0.0:55035]
PlayerConnection already initialized - listening to [0.0.0.0:55035]
Initialize engine version: 2019.1.2f1 (3e18427e571f)
GfxDevice: creating device client; threaded=1
Direct3D:
Version: Direct3D 11.0 [level 11.1]
Renderer: NVIDIA GeForce GTX 1070 (ID=0x1b81)
Vendor:
VRAM: 8088 MB
Driver: 25.21.14.1771
<RI> Initializing input.

<RI> Input initialized.

<RI> Initialized touch support.

UnloadTime: 0.579200 ms
ExecutionEngineException: Attempting to call method 'Opsive.UltimateCharacterController.StateSystem.Preset+GenericDelegate`1[[System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]::.ctor' for which no ahead of time (AOT) code was generated.
at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00000] in <00000000000000000000000000000000>:0
at System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) [0x00000] in <00000000000000000000000000000000>:0
at Opsive.UltimateCharacterController.StateSystem.Preset.Initialize (System.Object obj, Opsive.UltimateCharacterController.Utility.MemberVisibility visibility) [0x00000] in <00000000000000000000000000000000>:0
at Opsive.UltimateCharacterController.StateSystem.DefaultPreset.Initialize (System.Object obj, Opsive.UltimateCharacterController.Utility.MemberVisibility visibility) [0x00000] in <00000000000000000000000000000000>:0
at Opsive.UltimateCharacterController.StateSystem.StateManager.InitializeInternal (UnityEngine.GameObject gameObject, Opsive.UltimateCharacterController.StateSystem.IStateOwner owner, Opsive.UltimateCharacterController.StateSystem.State[] states) [0x00000] in <00000000000000000000000000000000>:0
at Opsive.UltimateCharacterController.StateSystem.StateManager.Initialize (UnityEngine.GameObject gameObject, Opsive.UltimateCharacterController.StateSystem.IStateOwner owner, Opsive.UltimateCharacterController.StateSystem.State[] states) [0x00000] in <00000000000000000000000000000000>:0
at Opsive.UltimateCharacterController.StateSystem.StateObject.Initialize (UnityEngine.GameObject gameObject) [0x00000] in <00000000000000000000000000000000>:0
at Opsive.UltimateCharacterController.Traits.Attribute.Initialize (UnityEngine.GameObject gameObject) [0x00000] in <00000000000000000000000000000000>:0
at Opsive.UltimateCharacterController.Traits.AttributeManager.Awake () [0x00000] in <00000000000000000000000000000000>:0
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00000] in <00000000000000000000000000000000>:0
at System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) [0x00000] in <00000000000000000000000000000000>:0
at Opsive.UltimateCharacterController.StateSystem.Preset.Initialize (System.Object obj, Opsive.UltimateCharacterController.Utility.MemberVisibility visibility) [0x00000] in <00000000000000000000000000000000>:0
at Opsive.UltimateCharacterController.StateSystem.DefaultPreset.Initialize (System.Object obj, Opsive.UltimateCharacterController.Utility.MemberVisibility visibility) [0x00000] in <00000000000000000000000000000000>:0
at Opsive.UltimateCharacterController.StateSystem.StateManager.InitializeInternal (UnityEngine.GameObject gameObject, Opsive.UltimateCharacterController.StateSystem.IStateOwner owner, Opsive.UltimateCharacterController.StateSystem.State[] states) [0x00000] in <00000000000000000000000000000000>:0
at Opsive.UltimateCharacterController.StateSystem.StateManager.Initialize (UnityEngine.GameObject gameObject, Opsive.UltimateCharacterController.StateSystem.IStateOwner owner, Opsive.UltimateCharacterController.StateSystem.State[] states) [0x00000] in <00000000000000000000000000000000>:0
at Opsive.UltimateCharacterController.StateSystem.StateObject.Initialize (UnityEngine.GameObject gameObject) [0x00000] in <00000000000000000000000000000000>:0
at Opsive.UltimateCharacterController.Traits.Attribute.Initialize (UnityEngine.GameObject gameObject) [0x00000] in <00000000000000000000000000000000>:0
at Opsive.UltimateCharacterController.Traits.AttributeManager.Awake () [0x00000] in <00000000000000000000000000000000>:0

(Filename: currently not available on il2cpp Line: -1)

ExecutionEngineException: Attempting to call method 'Opsive.UltimateCharacterController.StateSystem.Preset+GenericDelegate`1[[System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]::.ctor' for which no ahead of time (AOT) code was generated.
at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00000] in <00000000000000000000000000000000>:0
at System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) [0x00000] in <00000000000000000000000000000000>:0
at Opsive.UltimateCharacterController.StateSystem.Preset.Initialize (System.Object obj, Opsive.UltimateCharacterController.Utility.MemberVisibility visibility) [0x00000] in <00000000000000000000000000000000>:0
at Opsive.UltimateCharacterController.StateSystem.DefaultPreset.Initialize (System.Object obj, Opsive.UltimateCharacterController.Utility.MemberVisibility visibility) [0x00000] in <00000000000000000000000000000000>:0
at Opsive.UltimateCharacterController.StateSystem.StateManager.InitializeInternal (UnityEngine.GameObject gameObject, Opsive.UltimateCharacterController.StateSystem.IStateOwner owner, Opsive.UltimateCharacterController.StateSystem.State[] states) [0x00000] in <00000000000000000000000000000000>:0
at Opsive.UltimateCharacterController.StateSystem.StateManager.Initialize (UnityEngine.GameObject gameObject, Opsive.UltimateCharacterController.StateSystem.IStateOwner owner, Opsive.UltimateCharacterController.StateSystem.State[] states) [0x00000] in <00000000000000000000000000000000>:0
at Opsive.UltimateCharacterController.StateSystem.StateObject.Initialize (UnityEngine.GameObject gameObject) [0x00000] in <00000000000000000000000000000000>:0
at Opsive.UltimateCharacterController.Traits.Attribute.Initialize (UnityEngine.GameObject gameObject) [0x00000] in <00000000000000000000000000000000>:0
at Opsive.UltimateCharacterController.Traits.AttributeManager.Awake () [0x00000] in <00000000000000000000000000000000>:0
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00000] in <00000000000000000000000000000000>:0
at System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) [0x00000] in <00000000000000000000000000000000>:0
at Opsive.UltimateCharacterController.StateSystem.Preset.Initialize (System.Object obj, Opsive.UltimateCharacterController.Utility.MemberVisibility visibility) [0x00000] in <00000000000000000000000000000000>:0
at Opsive.UltimateCharacterController.StateSystem.DefaultPreset.Initialize (System.Object obj, Opsive.UltimateCharacterController.Utility.MemberVisibility visibility) [0x00000] in <00000000000000000000000000000000>:0
at Opsive.UltimateCharacterController.StateSystem.StateManager.InitializeInternal (UnityEngine.GameObject gameObject, Opsive.UltimateCharacterController.StateSystem.IStateOwner owner, Opsive.UltimateCharacterController.StateSystem.State[] states) [0x00000] in <00000000000000000000000000000000>:0
at Opsive.UltimateCharacterController.StateSystem.StateManager.Initialize (UnityEngine.GameObject gameObject, Opsive.UltimateCharacterController.StateSystem.IStateOwner owner, Opsive.UltimateCharacterController.StateSystem.State[] states) [0x00000] in <00000000000000000000000000000000>:0
at Opsive.UltimateCharacterController.StateSystem.StateObject.Initialize (UnityEngine.GameObject gameObject) [0x00000] in <00000000000000000000000000000000>:0
at Opsive.UltimateCharacterController.Traits.Attribute.Initialize (UnityEngine.GameObject gameObject) [0x00000] in <00000000000000000000000000000000>:0
at Opsive.UltimateCharacterController.Traits.AttributeManager.Awake () [0x00000] in <00000000000000000000000000000000>:0

(Filename: currently not available on il2cpp Line: -1)
 
It looks like all IL2CPP projects need to generate the delegate hooks now. If you do a search for "UNITY_WEBGL ||" you'll get six results. Three out of the six results have:

Code:
NET_4_6 || UNITY_2018_3_OR_NEWER ||

At the beginning and you'll need to do the same for the other three (AOTLinker.cs). After you add that everything should run smoothly.
 
Top