Contents

run(_:queue:)

Creates an action that executes a block on a specific dispatch queue.

Declaration

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

Parameters

  • block:

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

    node

    The node on which the action is running.

  • queue:

    The queue to perform the action on.

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