Contents

run(_:)

Creates an action that executes a block.

Declaration

class func run(_ block: @escaping  @Sendable (SCNNode) -> Void) -> SCNAction

Parameters

  • block:

    The block to run. The block takes a single parameter:

    node

    The node on which the action is running.

Return Value

A new action object.

Discussion

When the action executes, SceneKit calls the block. This action takes place instantaneously.

This action is not reversible; the reverse action executes the same block.

See Also

Creating Custom Actions