Unity Netcode cant build with IL2CPP
I just found out about IL2CPP and was exited to try it out. First I had problems with the C++ compiler. and now when building (everything works with mono) i get this error:
F:\unity\2021.2.14f1\Editor\Data\il2cpp\build\deploy\il2cpp.exe --convert-to-cpp --assembly=Library/Bee/artifacts/Android/ManagedStripped/Assembly-CSharp-firstpass.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/Assembly-CSharp.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/ClientNetworkTransform.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/LeanCommon.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/LeanTouch.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/Mono.Security.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/mscorlib.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/SimpleFileBrowser.Runtime.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/System.Configuration.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/System.Core.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/System.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/System.Xml.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/Unity.2D.Common.Runtime.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/Unity.Burst.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/Unity.Burst.Unsafe.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/Unity.Collections.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/Unity.Collections.LowLevel.ILSupport.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/Unity.Mathematics.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/Unity.Netcode.Adapter.UTP.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/Unity.Netcode.Components.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/Unity.Netcode.Runtime.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/Unity.Networking.Transport.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/Unity.RenderPipeline.Universal.ShaderLibrary.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/Unity.RenderPipelines.Core.Runtime.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/Unity.RenderPipelines.Universal.Runtime.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/Unity.TextMeshPro.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/UnityEngine.AndroidJNIModule.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/UnityEngine.AnimationModule.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/UnityEngine.AudioModule.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/UnityEngine.CoreModule.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/UnityEngine.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/UnityEngine.GridModule.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/UnityEngine.ImageConversionModule.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/UnityEngine.IMGUIModule.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/UnityEngine.InputLegacyModule.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/UnityEngine.InputModule.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/UnityEngine.ParticleSystemModule.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/UnityEngine.Physics2DModule.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/UnityEngine.PhysicsModule.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/UnityEngine.SharedInternalsModule.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/UnityEngine.SpriteMaskModule.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/UnityEngine.SpriteShapeModule.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/UnityEngine.SubsystemsModule.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/UnityEngine.TextCoreFontEngineModule.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/UnityEngine.TextCoreTextEngineModule.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/UnityEngine.TextRenderingModule.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/UnityEngine.TilemapModule.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/UnityEngine.TLSModule.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/UnityEngine.UI.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/UnityEngine.UIElementsModule.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/UnityEngine.UIElementsNativeModule.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/UnityEngine.UIModule.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/UnityEngine.UNETModule.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/UnityEngine.UnityWebRequestAudioModule.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/UnityEngine.UnityWebRequestModule.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/UnityEngine.UnityWebRequestTextureModule.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/UnityEngine.VRModule.dll --assembly=Library/Bee/artifacts/Android/ManagedStripped/UnityEngine.XRModule.dll --data-folder=E:/Desktop/meine bilder/DND/Library/Bee/artifacts/Android/il2cppOutput/data --generatedcppdir=E:/Desktop/meine bilder/DND/Library/Bee/artifacts/Android/il2cppOutput/cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile=unityaot-linux --profiler-report --profiler-output-file=E:/Desktop/meine bilder/DND/Library/Bee/artifacts/il2cpp_conv_9gz9.traceevents --print-command-line Error: IL2CPP error for method 'System.Void Import::ImportClientRpc_nhandler(Unity.Netcode.NetworkBehaviour,Unity.Netcode.FastBufferReader,Unity.Netcode.RpcParams)' in E:/Desktop/meine bilder/DND/Assets/Scripts/Import.cs:37 System.ArgumentException: An item with the same key has already been added. Key: Import_ImportClientRpcnhandler_m9F9DCBDD66A79B35E4F64A626118E4463D7F3343_MetadataUsageId at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at Unity.IL2CPP.CodeWriters.InMemoryGeneratedMethodCodeWriter.AddMetadataUsage(String identifier, MethodMetadataUsage usage) at Unity.IL2CPP.CodeWriters.CodeWriterExtensions.WriteMethodWithMetadataInitialization(IGeneratedMethodCodeWriter writer, String methodSignature, Action`2 writeMethodBody, String uniqueIdentifier, MethodReference methodRef, Boolean writingMethodBody) at Unity.IL2CPP.MethodWriter.WriteMethodDefinition(AssemblyWriteContext context, IGeneratedMethodCodeWriter writer, MethodReference method) at Unity.IL2CPP.SourceWriter.WriteTypesMethods(SourceWritingContext context, IGeneratedMethodCodeWriter writer, TypeWritingInformation& writingInformation, NPath filePath, Boolean writeMarshalingDefinitions) at Unity.IL2CPP.SourceWriters.SourceWriterBase`2.WriteItem(StreamWorkItemData`2 data) at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager`3.WorkerWriteItemsToFile(WorkItemData`2 data) at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler`1.WorkerLoop(Object data) Error: IL2CPP error (no further information about what managed code was being converted is available) System.InvalidOperationException: Failed to compare two elements in the array. ---> System.ArgumentException: Unhandled compare for System.Void Import::ImportClientRpcnhandler(Unity.Netcode.NetworkBehaviour,Unity.Netcode.FastBufferReader,Unity.Netcode.RpcParams) and System.Void Import::ImportClientRpcnhandler(Unity.Netcode.NetworkBehaviour,Unity.Netcode.FastBufferReader,Unity.Netcode._RpcParams)
Assembly Qualified Names were System.Void, mscorlib Import, Assembly-CSharp::ImportClientRpc_nhandler(Unity.Netcode.NetworkBehaviour, Unity.Netcode.Runtime,Unity.Netcode.FastBufferReader, Unity.Netcode.Runtime,Unity.Netcode.RpcParams, Unity.Netcode.Runtime) and System.Void, mscorlib Import, Assembly-CSharp::ImportClientRpcnhandler(Unity.Netcode.NetworkBehaviour, Unity.Netcode.Runtime,Unity.Netcode.FastBufferReader, Unity.Netcode.Runtime,Unity.Netcode._RpcParams, Unity.Netcode.Runtime)
at Unity.IL2CPP.DataModel.Awesome.Ordering.OrderingCompareExtensions.ThrowFailureException(String xToString, String yToString, String xAssemblyQualifiedName, String yAssemblyQualifiedName) at Unity.IL2CPP.DataModel.Awesome.Ordering.OrderingCompareExtensions.Compare(MethodDefinition x, MethodDefinition y) at Unity.IL2CPP.DataModel.Awesome.Ordering.OrderingCompareExtensions.Compare(MethodReference x, MethodReference y) at System.Collections.Generic.ArraySortHelper`1.InsertionSort(Span`1 keys, Comparison`1 comparer) at System.Collections.Generic.ArraySortHelper`1.IntroSort(Span`1 keys, Int32 depthLimit, Comparison`1 comparer) at System.Collections.Generic.ArraySortHelper`1.IntroSort(Span`1 keys, Int32 depthLimit, Comparison`1 comparer) at System.Collections.Generic.ArraySortHelper`1.IntroSort(Span`1 keys, Int32 depthLimit, Comparison`1 comparer) at System.Collections.Generic.ArraySortHelper`1.IntroSort(Span`1 keys, Int32 depthLimit, Comparison`1 comparer) at System.Collections.Generic.ArraySortHelper`1.IntroSort(Span`1 keys, Int32 depthLimit, Comparison`1 comparer) at System.Collections.Generic.ArraySortHelper`1.IntroSort(Span`1 keys, Int32 depthLimit, Comparison`1 comparer) at System.Collections.Generic.ArraySortHelper`1.IntroSort(Span`1 keys, Int32 depthLimit, Comparison`1 comparer) at System.Collections.Generic.ArraySortHelper`1.IntroSort(Span`1 keys, Int32 depthLimit, Comparison`1 comparer) at System.Collections.Generic.ArraySortHelper`1.IntroSort(Span`1 keys, Int32 depthLimit, Comparison`1 comparer) at System.Collections.Generic.ArraySortHelper`1.IntroSort(Span`1 keys, Int32 depthLimit, Comparison`1 comparer) at System.Collections.Generic.ArraySortHelper`1.IntroSort(Span`1 keys, Int32 depthLimit, Comparison`1 comparer) at System.Collections.Generic.ArraySortHelper`1.IntrospectiveSort(Span`1 keys, Comparison`1 comparer) at System.Collections.Generic.ArraySortHelper`1.Sort(Span`1 keys, IComparer`1 comparer) --- End of inner exception stack trace --- at System.Collections.Generic.ArraySortHelper`1.Sort(Span`1 keys, IComparer`1 comparer) at System.Array.Sort[T](T[] array, Int32 index, Int32 length, IComparer`1 comparer) at System.Collections.Generic.List`1.Sort(Int32 index, Int32 count, IComparer`1 comparer) at Unity.IL2CPP.Contexts.Components.MethodCollectorComponent.SortItems(List`1 items) at Unity.IL2CPP.Contexts.Components.Base.ItemsWithMetadataIndexCollectorPhaseSortSupport`4.PhaseSortItems() at Unity.IL2CPP.AssemblyConversion.Steps.Base.ContextFreeScheduledStep`1.WorkerWrapper(Object unusedContext) at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler`1.WorkerLoop(Object data) UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)