Currently, the program I'm working on doesn't have issues when compiling for Windows. When I attempt to compile for WebGL, I get the following error.
stdout:
IL2CPP error for type 'X4vckRISblwYfhcLu1.yMs8kGHnxK8u8PsnAJ' in assembly 'C:\Users\username\Documents\GitHub\Unity_Projects\ProjectName\Temp\StagingArea\Data\Managed\Core.dll'
Additional information: Exception has been thrown by the target of an invocation.
il2cpp.exe didn't catch exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Mono.Cecil.GenericInstanceType..ctor(TypeReference type)
at Unity.IL2CPP.GenericSharing.GenericSharingAnalysis.GetSharedType(TypeReference type)
at Unity.IL2CPP.GenericsCollection.GenericContextAwareVisitor.ProcessGenericType(GenericInstanceType type, InflatedCollectionCollector generics, GenericInstanceMethod contextMethod)
at Unity.IL2CPP.GenericsCollection.GenericContextFreeVisitor.ProcessCustomAttributeTypeReferenceRecursive(TypeReference typeReference)
at Unity.IL2CPP.GenericsCollection.GenericContextFreeVisitor.ProcessCustomAttributeArgument(CustomAttributeArgument customAttributeArgument)
at Unity.IL2CPP.GenericsCollection.GenericContextFreeVisitor.ProcessCustomAttributeArgument(CustomAttributeArgument customAttributeArgument)
at Unity.IL2CPP.GenericsCollection.GenericContextFreeVisitor.Visit(CustomAttributeArgument customAttributeArgument, Context context)
at Unity.Cecil.Visitor.Visitor.Visit(CustomAttribute customAttribute, Context context)
at Unity.Cecil.Visitor.Visitor.Visit(FieldDefinition fieldDefinition, Context context)
at Unity.Cecil.Visitor.Visitor.Visit(TypeDefinition typeDefinition, Context context)
at Unity.Cecil.Visitor.Visitor.Visit(ModuleDefinition moduleDefinition, Context context)
at Unity.Cecil.Visitor.Visitor.Visit(AssemblyDefinition assemblyDefinition, Context context)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Unity.Cecil.Visitor.Visitor.Visit[T](T node, Context context)
at Unity.IL2CPP.GenericsCollection.GenericsCollector.CollectPerAssembly(AssemblyDefinition assembly)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at Unity.IL2CPP.GenericsCollection.GenericsCollector.MergeCollections(IEnumerable`1 collections)
at Unity.IL2CPP.AssemblyConverter.Apply()
at Unity.IL2CPP.AssemblyConverter.ConvertAssemblies(IEnumerable`1 assemblyDirectories, IEnumerable`1 explicitAssemblies, NPath outputDir, NPath dataFolder, NPath symbolsFolder, NPath executableAssembiesFolder, NPath monoLibFolder, NPath monoEtcFolder, NPath[] searchDirectories, String entryAssemblyName, NPath[] extraTypesFiles)
at il2cpp.Program.DoRun(String[] args)
at il2cpp.Program.Run(String[] args)
at il2cpp.Program.Main(String[] args)
stderr:
Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Mono.Cecil.GenericInstanceType..ctor(TypeReference type)
at Unity.IL2CPP.GenericSharing.GenericSharingAnalysis.GetSharedType(TypeReference type)
at Unity.IL2CPP.GenericsCollection.GenericContextAwareVisitor.ProcessGenericType(GenericInstanceType type, InflatedCollectionCollector generics, GenericInstanceMethod contextMethod)
at Unity.IL2CPP.GenericsCollection.GenericContextFreeVisitor.ProcessCustomAttributeTypeReferenceRecursive(TypeReference typeReference)
at Unity.IL2CPP.GenericsCollection.GenericContextFreeVisitor.ProcessCustomAttributeArgument(CustomAttributeArgument customAttributeArgument)
at Unity.IL2CPP.GenericsCollection.GenericContextFreeVisitor.ProcessCustomAttributeArgument(CustomAttributeArgument customAttributeArgument)
at Unity.IL2CPP.GenericsCollection.GenericContextFreeVisitor.Visit(CustomAttributeArgument customAttributeArgument, Context context)
at Unity.Cecil.Visitor.Visitor.Visit(CustomAttribute customAttribute, Context context)
at Unity.Cecil.Visitor.Visitor.Visit(FieldDefinition fieldDefinition, Context context)
at Unity.Cecil.Visitor.Visitor.Visit(TypeDefinition typeDefinition, Context context)
at Unity.Cecil.Visitor.Visitor.Visit(ModuleDefinition moduleDefinition, Context context)
at Unity.Cecil.Visitor.Visitor.Visit(AssemblyDefinition assemblyDefinition, Context context)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Unity.Cecil.Visitor.Visitor.Visit[T](T node, Context context)
at Unity.IL2CPP.GenericsCollection.GenericsCollector.CollectPerAssembly(AssemblyDefinition assembly)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at Unity.IL2CPP.GenericsCollection.GenericsCollector.MergeCollections(IEnumerable`1 collections)
at Unity.IL2CPP.AssemblyConverter.Apply()
at Unity.IL2CPP.AssemblyConverter.ConvertAssemblies(IEnumerable`1 assemblyDirectories, IEnumerable`1 explicitAssemblies, NPath outputDir, NPath dataFolder, NPath symbolsFolder, NPath executableAssembiesFolder, NPath monoLibFolder, NPath monoEtcFolder, NPath[] searchDirectories, String entryAssemblyName, NPath[] extraTypesFiles)
at il2cpp.Program.DoRun(String[] args)
at il2cpp.Program.Run(String[] args)
at il2cpp.Program.Main(String[] args)
It appears to be caused by IL2CPP attempting to compile the .dll plugin. Why would it cause a null exception when compiling for WebGL but not when compiling for Windows?
Has anyone had an issue similar to this?
↧