cohtml.Editor.DefineSymbolsConfigurator
Automatically manages scripting define symbols and pipeline configuration based on the currently active render pipeline and platform architecture. More…
Inherits from IPreprocessBuildWithReport, IActiveBuildTargetChanged
Public Functions
Section titled “Public Functions”| Name | |
|---|---|
| void | Initialize() Initializes the configurator automatically when the editor loads. Sets up update callbacks and initializes the define collection. |
| void | SetupRPDefine() Sets up the correct render pipeline define symbols based on the active RP type. |
| bool | IsSymbolDefined(string symbol) Checks if a specific scripting define symbol is currently active. |
| void | AddDefineSymbols(params string [] symbolsToAdd) Adds the specified scripting define symbols to the active build target configuration. |
| void | RemoveDefineSymbols(params string [] symbolsToRemove) Removes the specified scripting define symbols from the active build target configuration. |
| void | UpdateDefineSymbols(string [] symbolsToRemove, string [] symbolsToAdd) Efficiently removes and adds multiple scripting define symbols in a single pass. Prevents the editor from triggering multiple costly recompilations. |
| void | OnActiveBuildTargetChanged(BuildTarget previousTarget, BuildTarget newTarget) |
| void | OnPreprocessBuild(BuildReport report) Called automatically before a build starts. Ensures correct architecture-related define symbols are applied. |
Public Attributes
Section titled “Public Attributes”| Name | |
|---|---|
| int | callbackOrder |
Detailed Description
Section titled “Detailed Description”class cohtml.Editor.DefineSymbolsConfigurator;Automatically manages scripting define symbols and pipeline configuration based on the currently active render pipeline and platform architecture.
This utility ensures that the correct compiler symbols are defined or removed when the project settings changed.
Public Functions Documentation
Section titled “Public Functions Documentation”function Initialize
Section titled “function Initialize”static void Initialize()Initializes the configurator automatically when the editor loads. Sets up update callbacks and initializes the define collection.
function SetupRPDefine
Section titled “function SetupRPDefine”static void SetupRPDefine()Sets up the correct render pipeline define symbols based on the active RP type.
function IsSymbolDefined
Section titled “function IsSymbolDefined”static bool IsSymbolDefined( string symbol)Checks if a specific scripting define symbol is currently active.
Parameters:
- symbol The exact string of the define symbol to check.
Return: True if the symbol is defined for the current build target, otherwise false.
function AddDefineSymbols
Section titled “function AddDefineSymbols”static void AddDefineSymbols( params string [] symbolsToAdd)Adds the specified scripting define symbols to the active build target configuration.
Parameters:
- symbolsToAdd A list of symbols to add.
function RemoveDefineSymbols
Section titled “function RemoveDefineSymbols”static void RemoveDefineSymbols( params string [] symbolsToRemove)Removes the specified scripting define symbols from the active build target configuration.
Parameters:
- symbolsToRemove A list of symbols to remove.
function UpdateDefineSymbols
Section titled “function UpdateDefineSymbols”static void UpdateDefineSymbols( string [] symbolsToRemove, string [] symbolsToAdd)Efficiently removes and adds multiple scripting define symbols in a single pass. Prevents the editor from triggering multiple costly recompilations.
Parameters:
- symbolsToRemove An array of symbols to remove. Can be null.
- symbolsToAdd An array of symbols to add. Can be null.
function OnActiveBuildTargetChanged
Section titled “function OnActiveBuildTargetChanged”void OnActiveBuildTargetChanged( BuildTarget previousTarget, BuildTarget newTarget)function OnPreprocessBuild
Section titled “function OnPreprocessBuild”void OnPreprocessBuild( BuildReport report)Called automatically before a build starts. Ensures correct architecture-related define symbols are applied.
Parameters:
- report Information about the current build.
Public Attributes Documentation
Section titled “Public Attributes Documentation”variable callbackOrder
Section titled “variable callbackOrder”int callbackOrder => 0;© 2026 Coherent Labs. All rights reserved.