unreal.NamingTokensEngineSubsystem¶
- class unreal.NamingTokensEngineSubsystem(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
EngineSubsystemAn editor subsystem for registering global tokens and evaluating strings across the entire project.
C++ Source:
Plugin: NamingTokens
Module: NamingTokens
File: NamingTokensEngineSubsystem.h
- clear_cached_naming_tokens() None¶
Clears all currently cached naming tokens. They will be loaded on demand when required. This can avoid an editor restart if a namespace is adjusted on a BP asset, and you don’t want the old namespace to access it.
- evaluate_token_list(token_list, filter, contexts) Array[NamingTokenValueData]¶
Given a list of tokens, return a list of all found tokens and their values.
- Parameters:
token_list (Array[str]) – A list of raw tokens. Tokens can include their namespace, but do not include brackets.
filter (NamingTokenFilterArgs) – [Optional] Filter to determine which namespaces to use.
contexts (Array[Object]) – [Optional] Context objects to pass to naming tokens.
- Returns:
Evaluation data for each token.
- Return type:
- evaluate_token_string(token_string, filter, contexts) NamingTokenResultData¶
Parse and evaluate token string.
- Parameters:
token_string (str) – The string containing unprocessed tokens.
filter (NamingTokenFilterArgs) – [Optional] Filter to determine which namespaces to use.
contexts (Array[Object]) – [Optional] Context objects to pass to naming tokens.
- Returns:
The result of the evaluation.
- Return type:
- evaluate_token_text(token_text, filter, contexts) NamingTokenResultData¶
Parse and evaluate token text.
- Parameters:
token_text (Text) – The text containing unprocessed tokens.
filter (NamingTokenFilterArgs) – [Optional] Filter to determine which namespaces to use.
contexts (Array[Object]) – [Optional] Context objects to pass to naming tokens.
- Returns:
The result of the evaluation.
- Return type:
- get_multiple_naming_tokens(namespaces) Array[NamingTokens]¶
Lookup multiple naming tokens from multiple namespaces.
- Parameters:
- Returns:
An array of matching tokens objects.
- Return type:
- get_naming_tokens(namespace) NamingTokens¶
Lookup naming tokens given a namespace. This will look first in cached naming tokens, then native classes, then blueprint classes. Call ClearCachedNamingTokens to reset the cache and force a full lookup.
- Parameters:
namespace (str) – The namespace of the tokens.
- Returns:
The found Naming Tokens object, or nullptr.
- Return type:
- get_naming_tokens_native(namespace) NamingTokens¶
Lookup naming tokens given a namespace. This will look first in cached naming tokens, then native classes. Call ClearCachedNamingTokens to reset the cache and force a full lookup.
- Parameters:
namespace (str) – The namespace of the tokens.
- Returns:
The found Naming Tokens object, or nullptr.
- Return type: