Assets目录下创建smcs.rsp文件,    重命名文件

2019-11-18 07:15 来源:未知

MD命令:

Rename 命令:  

能够在Unity Assets目录下创办smcs.rsp文件,并向在那之中增多预编写翻译命令,其会在unity运维时施行,譬如新建三个smcs.rsp文件,向此中增加内容:
-define:MYDEF
接下来就可以在剧本中参与宏推断:
#if MYDEF
....
#endif
其规律是开发银行Unity时会试行unity目录下的smcs.exe文件并丰裕预编写翻译命令,也得以透过cmd运维smcs.exe各个拉长预编译命令。
除此以外还可能有能够成立gmcs.rsp文件,对应Editor脚本中的预编写翻译命令。
www.129028.com,详细:

  // 描述:

  // 描述:  

Custom Preprocessor Directives

It is also possible to define your own preprocessor directives to control which code gets included when compiling. To do this you must add in the "Assets/" folder a text file with the extra directives. The name of the file depends on the language you are using :

C#
<Project Path>/Assets/smcs.rsp

C# - Editor Scripts
<Project Path>/Assets/gmcs.rsp

UnityScript
<Project Path>/Assets/us.rsp

Boo
<Project Path>/Assets/boo.rsp

As 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.
Every time you make make changes to the .rsp files a recompilation needs to be done for them to be effective. You can do this by updating or reimporting a single script (.js, .cs or .boo) file.
The usage of the .rsp files is described in the help of the smcs application, included in the Editor installation folder. You can get more information by running : "smcs -help".

比如说假诺想要在C#言语中央银行使指针,必得标志为unsafe的,暗许景况下unity中动用unsafe标志会报错,能够在档期的顺序中增加smcs.rsp文件并投入-unsafe预编写翻译命令,就可以编写翻译通过。

    (Make Directory)

    重命名文件或目录。

    创立多少个索引或子目录。

  // 语法:

  // 语法:

    rename [<Drive>:][<Path>]<FileName1> <FileName2>

TAG标签:
版权声明:本文由www.129028.com-澳门金沙唯一官网www129028com发布于操作系统资讯,转载请注明出处:Assets目录下创建smcs.rsp文件,    重命名文件