When trying to build the project the usual way (via the Build button), everything works perfectly fine. However, when trying to build it via the Build and Run button, Unity immediately throws a couple of exceptions and stops the build with seemingly no descriptive errors.
It works on an empty project with all the same settings, but I can’t figure out what may cause it. Urgent help is needed. The project runs on Unity 2020.2.1f1
Yes, we do have additional version control scripts hooking up before the build for validation. However, it’s a legacy system that we still haven’t removed. All it does now is just write a couple of Debug.LogError() messages. Those errors are not an issue when building for other platforms (Windows, PS4, XONE, Switch).
There are shader errors:
Shader error in ‘MegaFlares/Flare’: undeclared identifier ‘flarePosTemp’ at line 379 (on gles3)
Shader error in ‘MegaFlares/Flare’: undeclared identifier ‘flarePosTemp’ at line 379 (on vulkan)
IIRC shaders should never straight-up sabotage the build process.
That said though, I’ve reinstalled unity and all of its components and rebooted the PC and that seemed to help. Thanks for your time.