set

abstract fun set(key: String, value: String, target: VariableTarget?)

Set a text variable. The key must not be "scene_root" or start with "ubq.", because those name the built-in placeholders. The scene saves its variables, and undo reverts their changes. A variable set while no scene exists waits for the next scene. That scene takes it when it is created or loaded, as this setter without a target writes it. A value of another type than the loaded variable is dropped.

Parameters

key

the variable's key.

value

the text to replace the variable with.

target

the layer to write. null writes the active value set when it holds the key, else the default value, so that the getter returns the new value. A value set needs a variable of this type.


open fun set(key: String, value: String)

Set a text variable in the layer that the scene shows. Same as set with no target.