Question by
happynxy · Nov 26, 2018 at 03:17 AM ·
scripting problemdebugging
DEVELOPMENT_BUILD is not set in the Editor but works in device running
My project was always running correctly until I unchecked the 'development build' in Android build options and checked it again. After I re-checked the 'development build' option, my scripts are still compiled without the 'DEVELOPMENT_BUILD' preprocessor in the editor even if I rebuilt the project.
I have tried deleting the 'Library' directory under my project but the problem was also not resolved. But if I run the project on my device through 'build and run', everything is ok on my device.
Then I wrote the following code:
if (Debug.isDebugBuild) { Debug.Log("in debug build"); } #if DEVELOPMENT_BUILD Debug.Log("has DEVELOPMENT_BUILD"); #endif
In the editor, only 'in debug build' is printed. I have been getting in trouble with this problem for one day, can anyone help me?
Comment