位置:unity文档-Manual-Scripting-Platform dependent compilation Property: Function: UNITY_EDITOR #define directive for calling Unity Editor scripts from your game code. UNITY_EDITOR_WIN #define directive for Editor code on Windows. UNITY_EDITOR_OSX #defin…
unity平台的预处理 在开发中,特别是unity的跨平台中,我们经常会在各个平台游走,如安卓版,苹果版,PC版.......在此不同的平台上,有可能我们需要做不同的操作.然而我们就可以用unity的自带的平台宏定义方式来做平台的判断.Unity帮我们定义了如下平台预处理: 名称 描述 UNITY_EDITOR Define for calling Unity Editor scripts from your game code. UNITY_STANDALONE_OSX Platf…