- Home /
Unity Build 'Succeeded' but with errors. Build Crashes immediately.
So, my game for the 2019 Global Game Jam worked perfectly in the editor, but the build didn't work as expected. When I build, it completes as a success but with a few errors. Running the build itself results in a crash before the game loads. I'm using Unity 2018.3.3f1 and these packages are included:
I'm kind of at a loss. My first suspect was the lightweight render pipeline and shader graph. I pulled those out, and the issue continued. I then tried to bundle individual parts of the project into packages and recreate the project piece by piece, making builds to identify what broke the build. However, this was totally inconsistent. Importing 1 package in a certain order would break it, but not when imported in a different order.
Attached is the log file and the crash file from running the build.
Answer by tmarshall619 · Jan 31, 2019 at 10:53 PM
For anyone it might help, the issue was in a section of code in Start() where I was creating a new object and copying the mesh filter, mesh, mesh renderer of one object to the new object and then giving it a material. I'm not exactly sure why this caused the build to crash with no discernable errors but changing that fixed it.