Conditional Compilation in Unity

We are spoiled by Unity with that whole “write once, run everywhere” thing. But what if we want to run different code on different platforms? Conditional compilation will come very handy here, or like Unity like to put it Platform Depended Compilation. ?

Wait, what’s that?

Great question! Conditional compilation is basically a way to tell the compiler to run code only if compiling condition is met.

Wait a moment. This sounds a lot of like a regular if-statement! What’s the catch?

Continue reading “Conditional Compilation in Unity”