#define UNITY_EDITOR

 #define A


if A
        
Debug.Log("A");

#endif

编译器选android模式会
同时执行

#if UNITY_ANDROID
        Debug.Log("UNITY_ANDROID");
#endif
#if UNITY_EDITOR
        Debug.Log("UNITY_EDITOR");
#endif
#

猜你喜欢

转载自blog.csdn.net/a133900029/article/details/79994357