I’m running via the Unity editor and compiling/debugging via Mono. I read that you can check for DEBUG to isolate code to the Debug configuration (and noticed this as a ‘Define Symbol’ in the Mono project options), so as a test I have this very simple check in my C# script:
Unfortunately, regardless of the configuration set in Mono, I always get the Booo path. Does this have something to do with running via the Unity editor (perhaps you lose the Mono preprocessor defines this way)? Is there another way to live-debug that allows for isolating debug code?
You also could use [System.Diagnostics.Conditional(“Something”)] to disable or able any function in c#.
“Something” should be defined in “BuildSettings-> PlayerSettings->Scripting Define Symbols”.