#if not defined in C# scripting...

I find it funny that your examples only show this on Boo Script...

Is there a way to do this with C# scripting?

thanks, stringa

Try this

#if !UNITY_IPHONE
    // something that only happens when it's not an iphone build
#endif

Yes. Check out Platform Dependent Compilation.

I looked there before asking this question....hence I specified C# as my language.

These examples only show the NOT case with BOO scripting...

I want to know if it's possible to do this with C# and what exactly the syntax is.

Thanks, stringa

I know this is an a bit out dated question.
But just in case anyone like me needs to know this:

You can do #if not defined by simply using the !, for example:

#define DEBUG

#if (!DEBUG)
    //Do release things here
#endif
#if (DEBUG)
    //Do debug things here
#endif

or just

#if (!DEBUG)
    //Do release things here
#else
    //Do debug things here
#endif

read more: C# preprocessor directives | Microsoft Learn