Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Discussion Unity 2021.3.7f1 IL2CPP Build Error

Discussion in 'Editor & General Support' started by Lemior, Aug 10, 2022.

  1. Lemior

    Lemior

    Joined:
    Nov 12, 2020
    Posts:
    15
    Hi,

    im currently trying to build my project, but it does not work. I always get the following error messages shown in the image below. I also tried to build an empty project and it worked. So the error must come from my project. I'm currently using Unity 2021.3.7f1. I also updated all the packages, but the error stays the same.

    upload_2022-8-10_19-30-56.png

    Thank you for your help.
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    If an empty project works and yours doesn't, then that is your path forward. Use bisection/divide-and-conquer to find the issue. Generally speaking, add 1/2 of the same packages to the empty project and see if you see the same error. If so, divide in 1/2 again, etc.
     
  3. Lemior

    Lemior

    Joined:
    Nov 12, 2020
    Posts:
    15
    Thank you for your quick reply.
    I did it exactly like u said, but i realized that non of the packages are the reason for that. After deleting the scripts folder from my project it builded again. So i thought this must be the problem. I created a new project and copied all the scripts into this project. There i could build it. Now i'm confused. I don' know were to continue searching, because that is contradictory.

    Edit:
    I found out why it is like that. The new project was set to compile with Mono and the original with I2CPP. When i compile the original also with Mono it works. When i set my new project to I2CPP it crashes with my scripts folder and it builds without it. So i will go through my scripts and look what causes the problem.

    Edit 2:
    I found the error. I was very well hidden. The cause for this problem is in fact a package. The problem is when i dont reference this package by one of my scripts the project builds, but if i add one reference like this "private VehiclePhysics.VPVehicleController test = null;" it crashes. The package is VPP. I downloaded the new version of the package. In the changelog it states fixed I2CPP error. So it should work now

    Edit 3:
    Updating the package fixed it.
     
    Last edited: Aug 11, 2022