4

When i try to build my project using mono everythig works fine but when i use il2cpp i get this error.

Building Library\Bee\artifacts\WinPlayerBuildProgram\ManagedStripped failed with output:
H:\unity\2021.3.5f1\Editor\Data\il2cpp\build\deploy\UnityLinker.exe --search-directory=H:/unity/projekty/URP TEST/Temp/StagingArea/Data/Managed --out=Library/Bee/artifacts/WinPlayerBuildProgram/ManagedStripped --include-link-xml=H:/unity/projekty/URP TEST/Temp/StagingArea/Data/Managed\MethodsToPreserve.xml --include-link-xml=H:/unity/projekty/URP TEST/Temp/StagingArea/Data/Managed\TypesInScenes.xml --include-link-xml=H:/unity/projekty/URP TEST/Temp/StagingArea/Data/Managed\SerializedTypes.xml --include-link-xml=H:/unity/projekty/URP TEST/Assets\..\Temp\InputSystemLink.xml --include-link-xml=H:\unity\projekty\URP TEST\Assets\Bhop\PlayFabSDK\link.xml --include-directory=H:/unity/projekty/URP TEST/Temp/StagingArea/Data/Managed --dotnetprofile=unityaot-win32 --dotnetruntime=Il2Cpp --platform=WindowsDesktop --use-editor-options --engine-modules-asset-file=H:/unity/2021.3.5f1/Editor/Data/PlaybackEngines/WindowsStandaloneSupport/modules.asset --editor-data-file=H:/unity/projekty/URP TEST/Temp/StagingArea/Data/Managed/EditorToUnityLinkerData.json --include-unity-root-assembly=H:/unity/projekty/URP TEST/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll --include-unity-root-assembly=H:/unity/projekty/URP TEST/Temp/StagingArea/Data/Managed/kcp2k.dll --include-unity-root-assembly=H:/unity/projekty/URP TEST/Temp/StagingArea/Data/Managed/Bayat.Core.Runtime.dll --include-unity-root-assembly=H:/unity/projekty/URP TEST/Temp/StagingArea/Data/Managed/Unity.InputSystem.dll --include-unity-root-assembly=H:/unity/projekty/URP TEST/Temp/StagingArea/Data/Managed/IngameDebugConsole.Runtime.dll --include-unity-root-assembly=H:/unity/projekty/URP TEST/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll --include-unity-root-assembly=H:/unity/projekty/URP TEST/Temp/StagingArea/Data/Managed/Mirror.Authenticators.dll --include-unity-root-assembly=H:/unity/projekty/URP TEST/Temp/StagingArea/Data/Managed/Telepathy.dll --include-unity-root-assembly=H:/unity/projekty/URP TEST/Temp/StagingArea/Data/Managed/where-allocations.dll --include-unity-root-assembly=H:/unity/projekty/URP TEST/Temp/StagingArea/Data/Managed/Mirror.Components.dll --include-unity-root-assembly=H:/unity/projekty/URP TEST/Temp/StagingArea/Data/Managed/Mirror.dll --include-unity-root-assembly=H:/unity/projekty/URP TEST/Temp/StagingArea/Data/Managed/Bayat.Json.Runtime.dll --include-unity-root-assembly=H:/unity/projekty/URP TEST/Temp/StagingArea/Data/Managed/Unity.RenderPipelines.Universal.Runtime.dll --include-unity-root-assembly=H:/unity/projekty/URP TEST/Temp/StagingArea/Data/Managed/Unity.VisualEffectGraph.Runtime.dll --include-unity-root-assembly=H:/unity/projekty/URP TEST/Temp/StagingArea/Data/Managed/Mirror.Examples.dll --include-unity-root-assembly=H:/unity/projekty/URP TEST/Temp/StagingArea/Data/Managed/Unity.TextMeshPro.dll --include-unity-root-assembly=H:/unity/projekty/URP TEST/Temp/StagingArea/Data/Managed/PlayFab.dll --include-unity-root-assembly=H:/unity/projekty/URP TEST/Temp/StagingArea/Data/Managed/Unity.RenderPipelines.Core.Runtime.dll --include-unity-root-assembly=H:/unity/projekty/URP TEST/Temp/StagingArea/Data/Managed/Bayat.SaveSystem.Runtime.dll --include-unity-root-assembly=H:/unity/projekty/URP TEST/Temp/StagingArea/Data/Managed/RuntimePreviewGenerator.Runtime.dll --include-unity-root-assembly=H:/unity/projekty/URP TEST/Temp/StagingArea/Data/Managed/SimpleWebTransport.dll --print-command-line
Fatal error in Unity CIL Linker
Mono.Linker.LinkerFatalErrorException: ILLink: error IL1005: System.Windows.Forms.XplatUIX11.SetDisplay(IntPtr): Error processing method 'System.Windows.Forms.XplatUIX11.SetDisplay(IntPtr)' in assembly 'System.Windows.Forms.dll'
 ---> Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'
   at Unity.IL2CPP.Common.MissingMethodStubber.GetTypeModule(TypeReference type, IEnumerable`1 assemblies)
   at Unity.Linker.Steps.AddUnresolvedStubsStep.MarkAssemblyOfType(UnityLinkContext context, TypeReference type)
   at Unity.Linker.Steps.Marking.UnresolvedStubMarking.HandleUnresolvedType(TypeReference reference)
   at Unity.Linker.Steps.UnityMarkStep.HandleUnresolvedType(TypeReference reference)
   at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference, DependencyInfo reason, IMemberDefinition sourceLocationMember)
   at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body)
   at Unity.Linker.Steps.UnityMarkStep.MarkMethodBody(MethodBody body)
   at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method, DependencyInfo& reason)
   at Unity.Linker.Steps.UnityMarkStep.ProcessMethod(MethodDefinition method, DependencyInfo& reason)
   at Mono.Linker.Steps.MarkStep.ProcessQueue()
   --- End of inner exception stack trace ---
   at Mono.Linker.Steps.MarkStep.ProcessQueue()
   at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue()
   at Mono.Linker.Steps.MarkStep.Process()
   at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
   at Unity.Linker.Steps.UnityMarkStep.Process(LinkContext context)
   at Unity.Linker.UnityPipeline.ProcessStep(LinkContext context, IStep step)
   at Mono.Linker.Pipeline.Process(LinkContext context)
   at Unity.Linker.UnityDriver.UnityRun(Boolean noProfilerAllowed, ILogger customLogger)
   at Unity.Linker.UnityDriver.RunDriverWithoutErrorHandling(ILogger customLogger, Boolean noProfilerAllowed)
   at Unity.Linker.UnityDriver.RunDriver()
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

I would be very grateful for your help

Morion
  • 10,495
  • 1
  • 24
  • 33
Bialy
  • 41
  • 1

0 Answers0