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
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. |
| 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. |
| List< string > | GetDefinesAsCollection() Retrieves all currently defined scripting symbols for the active build target as a list. |
| void | OnPreprocessBuild(BuildReport report) Called automatically before a build starts. Ensures correct architecture-related define symbols are applied. |
Public Properties
| Name | |
|---|---|
| List< string > | DefinesCollection Gets the current collection of scripting define symbols for the active build target. |
Public Attributes
| Name | |
|---|---|
| int | callbackOrder |
| const string | EditorPrefsRpTypeKey Editor preference key used to store the last active render pipeline type. |
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
function Initialize
static void Initialize()
Initializes the configurator automatically when the editor loads. Sets up update callbacks and initializes the define collection.
function SetupRPDefine
static void SetupRPDefine()
Sets up the correct render pipeline define symbols based on the active RP type.
function AddDefineSymbols
static void AddDefineSymbols(
params string [] symbolsToAdd
)
Adds the specified scripting define symbols to the active build target configuration.
Parameters:
- symbolsToAdd Symbols to add.
function RemoveDefineSymbols
static void RemoveDefineSymbols(
params string [] symbolsToRemove
)
Removes the specified scripting define symbols from the active build target configuration.
Parameters:
- symbolsToRemove Symbols to remove.
function GetDefinesAsCollection
static List< string > GetDefinesAsCollection()
Retrieves all currently defined scripting symbols for the active build target as a list.
Return: A list of scripting define symbols.
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 Property Documentation
property DefinesCollection
static List< string > DefinesCollection;
Gets the current collection of scripting define symbols for the active build target.
Public Attributes Documentation
variable callbackOrder
int callbackOrder => 0;
variable EditorPrefsRpTypeKey
const string EditorPrefsRpTypeKey = "Cohtml_RPType";
Editor preference key used to store the last active render pipeline type.