- Home /
Using Conditional Compilers?
Hello, I'm wondering if i can cause conditional compilers to NOT comment out code when I am just testing inside of unity. And ONLY comment out code when I'm building to say iPhone or standalone or android etc.
Docs: http://docs.unity3d.com/Documentation/Manual/PlatformDependentCompilation.html
Thanks Daniel
Answer by DocteurCox · Jul 30, 2013 at 03:04 PM
I'm not sure to understand your question.
If what you want is just not having MonoDevelop "comment out" your code, then you should have a look at MonoDevelop's documentation. There are probably some settings for that in syntax highlighting options.
If you want Unity to run any platform specific code if you are in editor, then you'd have to do something like this :
#if UNITY_IPHONE || UNITY_EDITOR
//your code
#endif
Hope it helps :)
Wow can't believe i didn't see that :P THAN$$anonymous$$S!
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
How to exclude Player from Picking himself up! C# 1 Answer
Attach object as child using code 1 Answer
Unity and Leap Motion: Help with Jerkiness of input! 1 Answer
JavaScript help 1 Answer