Conditional compile with || and &&

are || and && operators supposed to work with conditional compile directives?

#if UNITY_IPHONE && UNITY_ANDROID

dosomething();

#elif UNITY_EDITOR

dosomethingelse();

#else

donothing();

#endif

|| and && operators do work.

In your case, the first condition will always be false since you cannot build for iPhone and Android at the same time. You need to use ||.

#if UNITY_IPHONE || UNITY_ANDROID