unreal.ConsoleVariablesAsset

class unreal.ConsoleVariablesAsset(outer: Object | None = None, name: Name | str = 'None')

Bases: Object

An asset used to track collections of console variables that can be recalled and edited using the Console Variables Editor.

C++ Source:

  • Plugin: ConsoleVariables

  • Module: ConsoleVariablesEditorRuntime

  • File: ConsoleVariablesAsset.h

Editor Properties: (see get_editor_property/set_editor_property)

  • variable_collection_description (str): [Read-Write] User defined description of the variable collection

add_or_set_console_object_saved_data(data) None

Set the value of a saved console variable if the name matches; add a new console variable to the list if a match is not found.

Parameters:

data (ConsoleVariablesEditorAssetSaveData) –

copy_from(asset_to_copy) None

Copy data from input asset to this asset

Parameters:

asset_to_copy (ConsoleVariablesAsset) –

execute_saved_commands(world_context_object, only_include_checked=False) None

Executes all saved commands in this asset, optionally only including those with a Checked checkstate in the UI.

Parameters:
  • world_context_object (Object) –

  • only_include_checked (bool) – If true, only commands and variables with a Checked checkstate in the Console Variables Editor UI will be included. Otherwise, all will be included.

find_saved_data_by_command_string(command_string, search_case=SearchCase.IGNORE_CASE) ConsoleVariablesEditorAssetSaveData or None

Outputs the FConsoleVariablesEditorAssetSaveData matching InCommand. Returns whether a match was found. Case sensitive.

Parameters:
Returns:

out_value (ConsoleVariablesEditorAssetSaveData):

Return type:

ConsoleVariablesEditorAssetSaveData or None

get_saved_commands() Array[ConsoleVariablesEditorAssetSaveData]

Returns the saved list of console variable information such as the variable name, the type and the value of the variable at the time the asset was saved.

Return type:

Array[ConsoleVariablesEditorAssetSaveData]

get_saved_commands_as_comma_separated_string(only_include_checked=False) str

Returns the saved list of console variables as a concatenated comma-separated string. Useful for passing commands and variables to a command line.

Parameters:

only_include_checked (bool) – If true, only commands and variables with a Checked checkstate in the Console Variables Editor UI will be included. Otherwise, all will be included.

Return type:

str

get_saved_commands_as_string_array(only_include_checked=False) Array[str]

Returns the saved list of console variables as an array of FString.

Parameters:

only_include_checked (bool) – If true, only commands and variables with a Checked checkstate in the Console Variables Editor UI will be included. Otherwise, all will be included.

Return type:

Array[str]

get_saved_commands_count() int32

Returns how many console variables are serialized in this asset

Return type:

int32

get_variable_collection_description() str

Get Variable Collection Description

Return type:

str

remove_console_variable(command_string) bool

Returns true if the element was found and successfully removed.

Parameters:

command_string (str) –

Return type:

bool

replace_saved_commands(replacement) None

Completely replaces the saved data with new saved data

Parameters:

replacement (Array[ConsoleVariablesEditorAssetSaveData]) –

set_variable_collection_description(variable_collection_description) None

Sets a description for this variable collection.

Parameters:

variable_collection_description (str) –

property variable_collection_description: str

[Read-Only] User defined description of the variable collection

Type:

(str)