Skip to content

ToggleSwitchAction ​

Inherits: EventAction < Resource

Action to toggle a switch between ON and OFF states

Properties ​

intinteractable_unique_id0

Variables ​

InteractableObjecttarget_switchnull

Methods ​

Stringget_function_description()
InteractableObjectfind_target_switch()
Dictionarysave()
voidload_data( data: Dictionary )

Property descriptions ​

int interactable_unique_id = 0 ​

ID of the switch/light to toggle

Variable descriptions ​

InteractableObject target_switch = null ​

Reference to the target switch

Method descriptions ​

String get_function_description() ​

Return a description of this action with parameter placeholders

InteractableObject find_target_switch() ​

Find the target switch by ID

Dictionary save() ​

Save action state to a dictionary

void load_data( data: Dictionary ) ​

Load action state from a dictionary