How to define a custom pre variable like "#if UNITY_EDITOR"

How to define a custom pre variable like “#if UNITY_EDITOR” , if i want give a “SCREEN_SIZE” variable…

At the top of your script you need to define the preprocessor condition like:

#define SCREEN_SIZE

As of Unity 4 you can define custom macros via the player settings inspector (on a per platform basis).

“Scripting Define Symbols” described here http://docs.unity3d.com/Documentation/Components/class-PlayerSettings40.html