Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


scriptingDefines

Lists the user-specified script compilation defines in the build profile.
Read time 1 minuteLast updated 10 days ago

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.