- Home /
Flag between different platform
I found iPhone to Mouse Input C# script which might be useful for testing on window if I Can replace that iPhoneInput with Generic Input (Unity 3.0)... How can I know whether we are testing and building for iPhone or Windows? Does the unity has any #ifdef flags something like
ifdef iPhone
DOSomething();
endif
ifdef PC
DOSomething();
endif
Answer by Mike 3 · Oct 10, 2010 at 04:26 AM
You can use #if, #elseif and #else for platform dependent compilation
The defines you can use with it are described here:
http://unity3d.com/support/documentation/Manual/Platform%20Dependent%20Compilation.html
Your answer
Follow this Question
Related Questions
Is there a #define for Build Settings Platform? 1 Answer
Platform strings used in SetPlatformTextureSettings() 2 Answers
If you're creating a Multiplatform game how do you know that system can handle it? 1 Answer
Simultaneous Multi-Platform Development Workflow and Best Practices 5 Answers
Network Question. Sending value from iPhone Client to Mac Server 1 Answer