- Home /
preprocessor directivities with JavaScript
As I know, it is possible to use #if, #else and #endif preprocess with C# in Unity.
But any other way for JavaScript?
Just trying to run Penellope with Unity windows and it needs to block any iphone specific codes.
Any other ideas?
Thank you,
Kim Hyoun-woo
Answer by Eric5h5 · Feb 04, 2010 at 12:15 PM
Javascript doesn't have any support for preprocessor directives.
Edit: in Unity 2.6 anyway.
Answer by Pablo 1.du · Feb 26, 2011 at 04:35 PM
Javascript supports #if and #endif in Unity 3. The Unity Manual -> Advanced -> Platform Dependent Compilation talks about it. They could do more to explain it (like is #else supported).
Your answer
![](https://koobas.hobune.stream/wayback/20220612051138im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to merge two shaders 1 Answer
Why do placing a preprocessor directive inside another causes my script to lose proper indentation? 1 Answer
Check if a class as been defined 0 Answers
Which requirements are available for SHADER_REQUIRE and SHADER_AVAILABLE? 0 Answers
How to use #define to turn debug information on/off 1 Answer