In most of my projects, it would be extremely useful to be able to enable/disable/destroy certain objects based on whether the application is built as a development build or not. Specifically, I’m looking for a way to branch in script based on this state.
Obviously there is something internal tracking this somewhere since Unity adds a display tag if you build that way, but I haven’t been able to find any way to access this yet. Anyone have any ideas?
Actually the purpose of the development build is to test your application like a released-one but with debugging option activated. Willing to have different scripts based on the fact that it is or not a development build makes no sense.
How will you test your real build if it is different from the development build?
Anyway Unity does not provide such option. But you can define a COMPILATION CONSTANT (#define) and use #ifdef in your script. When you build the release, just remove the #define.