- Home /
Question by
Bennett-Lynch · Oct 11, 2014 at 06:12 PM ·
preprocessor
Possible to "or" two preprocessor directives together?
If I have the following code:
#if UNITY_STANDALONE_WIN
// some code
#endif
#if UNITY_EDITOR_WIN
// same code as above
#endif
Can I combine them together some way so I don't have to write the same code twice?
Comment
Best Answer
Answer by Eric5h5 · Oct 11, 2014 at 06:12 PM
# if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN
Simple enough... shoulda tried that first I guess. Thanks!
Your answer
Follow this Question
Related Questions
What C# predefines are recognized by Unity? 3 Answers
preprocessor directives giving either error or warning 1 Answer
Set preprocessor symbols from Editor script 2 Answers
[Shader] Usage #ifdef DIRECTIONAL 0 Answers
Multiple webplayer platforms 1 Answer