Is if(Application.platform == RuntimePlatform.X)
the same as #IF UNITY_X
?
#if #elif #else
are preprocessor directives. If the “if” statement returns false, the code block contained in it won’t be compiled at all, whereas by using if(Application.platform == RuntimePlatform.X) it will be compiled regardless of the platform and will produce an error.