Platform Dependent Compilation

时间:2021-12-14 16:56:39

Platform Dependent Compilation

1、Platform Defines

  Platform Dependent Compilation

2、在Project Setting -> Player 面板的Other Settings的Scripting Define Symbols可以自定义macro,在此片定义的macro会被所有代码引用。

  Platform Dependent Compilation

  以分号分隔。

3、You can define your own preprocessor directives to control which code gets included when compiling. To do this you must add a text file with the extra directives to the "Assets/" folder. The name of the file depends on the language you are using, and the extension is .rsp:

  Platform Dependent Compilation

  Platform Dependent CompilationAs an example, if you include the single line "-define:UNITY_DEBUG" in your smcs.rsp file the define UNITY_DEBUG will exist as a global define for C# scripts, except for Editor scripts.

  smcs.exe路径:...\Unity\Editor\Data\Mono\lib\mono\unity

参考:

1、file:///D:/Program%20Files%20(x86)/Unity/Editor/Data/Documentation/Documentation/Manual/PlatformDependentCompilation.html

2、http://answers.unity3d.com/questions/351440/smcsexe-consistently-crashes.html

3、file:///D:/Program%20Files%20(x86)/Unity/Editor/Data/Documentation/Documentation/Components/class-PlayerSettings40.html