Search Unity

Unity 2021.3.2 3D(URP) Core Windows IL2CPP Builds errors

Discussion in 'Editor & General Support' started by Natoff, May 21, 2022.

  1. Natoff

    Natoff

    Joined:
    Feb 24, 2017
    Posts:
    17
    I failed to build 3D (URP) Core with IL2CPP with

    il2cpp.png

    Error: IL2CPP error for method 'System.Single UnityEngine.Mathf::Max(System.Single,System.Single)' in C:/buildslave/unity/build/Runtime/Export/Math/Mathf.cs:143

    This is a new project. I only switch backend from mono to IL2CPP.

    I can build the scene with Mono without any problem.

    mono.png
    --------------------------------------------------------------------------------------------------------------------------------------------
    Also I can build IL2CPP success with Unity 2020.3 and 2019.4

    Please advise me how do I config to solve the problem.

    Thank you
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,697
    Is it just extra crud?

    Extra unwanted packages in new projects (collab, testing, rider and other junk):

    https://forum.unity.com/threads/temp-unityengine-testrunner-dll-error.1133938/#post-7287748

    About the fastest way I have found to make a project and avoid all this noise is to create the project, then as soon as you see the files appear, FORCE-STOP (hard-kill) Unity (with the Activity Manager or Task Manager), then go hand-edit the Packages/manifest.json file as outlined in the above post, then reopen Unity.

    Sometimes the package system gets borked from all this unnecessary churn and requires the package cache to be cleared:

    https://stackoverflow.com/questions/53145919/unity3d-package-cache-errors/69779122
     
    Natoff likes this.
  3. Natoff

    Natoff

    Joined:
    Feb 24, 2017
    Posts:
    17
    Thank you for your advise.

    However I found the issue came from windows region setting. After I switch from Thai to English (American), I can build IL2CPP without any error.

    il2cpp.png
     
    Kurt-Dekker likes this.
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,931
  5. galnikkozmelj

    galnikkozmelj

    Joined:
    May 29, 2019
    Posts:
    7
    @Natoff i had same problem..its bug with memory or pointers idk... try to force quit unity and reopen .. this worked for me