文档

Unity Engine

Unity Engine

scriptingDefines

Lists the user-specified script compilation defines in the build profile.
阅读时间1 分钟最后更新于 1 个月前

Definition

public string[] scriptingDefines { get; set; }

Remarks

Player and Editor scripts include these script compilation defines only if the build profile is active. Unity serializes the defines in the build profile asset, so each profile holds its own set. Edit them through this property or in the Scripting Defines section of the Build Profiles window.
These defines add to the symbols stored in the Player settings instead of replacing them. PlayerSettings.GetScriptingDefineSymbols returns the Player settings symbols only, so read this property to get the symbols that the profile contributes. Additional Resources: PlayerSettings.