- Home /
Workflow: How can I run a scene without fixing compiler errors?
This may sound like a silly question, but I am working on a project using Unity Teams and have a project that a few other people are able to push changes too. Sometimes these people do inadvisable things like pushing uncompilable code. Because of the way Unity works, the project will not run if any of the scripts in the project cannot be compiled, even if these scripts are not used in the current scene.
I'm looking for a way to run a scene, which should be fully functional on its own, without being stopped by a compiler error in an unused script. Bar modifying the scripts themselves. If I delete three scripts then it all runs and works, but I don't want to do that. I also don't want to have to fix someone else's compiler errors. That's not my turf.
Does such a feature exist? If not, I think one should.
Answer by xxmariofer · Nov 05, 2019 at 10:35 PM
my only suggestion is using scripting define symbols, thats the only way i can think of. this would be an example, if you want to compile it you just go to the player settings - scripting define symbols and add/remove when needed, or create an insttuction for each level if you want them independant, this is basically how crossplatform is developed, so that only the desired code gets compiled when developing one platform
#if UNFINISHED
public class YourClass : MonoBehaviour
{
public void Awake()
{
int number = 5 + "COOL STUFF";
}
}
#endif
Your answer
Follow this Question
Related Questions
Script FPS Game Emitter Compiler error,ParticleEmitter now wont work 0 Answers
the type or namespace name "PostProcessingProfile" could not be found 0 Answers
UnityEditor Compiling Error :: VisualStudio Crash 0 Answers
Unity 5 Mouse Look Problem 1 Answer
Unhandled Exception: System.UnauthorizedAccessException 1 Answer