fromArtboard

fun fromArtboard(artboard: Artboard, stateMachineName: String? = null): StateMachine

Creates a new StateMachine from an Artboard.

⚠️ The lifetime of the returned state machine is managed by the caller. Make sure to call close when you are done with it to release its resources.

Return

The created state machine.

Parameters

artboard

The Artboard to instantiate the state machine from.

stateMachineName

The name of the state machine to load. If null, the default state machine will be loaded.