remove

abstract fun remove(key: String, target: VariableTarget?)

Destroy a variable of any type. Bound properties keep their last value and their binding, so direct writes to them still fail with BLOCK.PROPERTY_BOUND. Setting a variable with the same key and type again makes them follow it again.

Parameters

key

the variable's key.

target

the layer to remove from. null and VariableTarget.Default remove the variable with its value in every value set. A value set removes only its own value, and the variable stays.


open fun remove(key: String)

Destroy a variable with its value in every value set. Same as remove with no target.