SCNSceneSourceStatusHandler
The signature for the block that SceneKit calls periodically to report progress while loading a scene.
Declaration
typealias SCNSceneSourceStatusHandler = (Float, SCNSceneSourceStatus, (any Error)?, UnsafeMutablePointer<ObjCBool>) -> VoidDiscussion
You provide a block with this signature when using the scene(options:statusHandler:) method.
The block takes four parameters:
- totalProgress
A floating-point number between
0.0and1.0indicating the overall progress of loading the scene. A value of0.0indicates that the loading process has just begun, and a value of1.0indicates that the process has completed.- status
A constant identifying one of the distinct phases of SceneKit’s loading procedure. See SCNSceneSourceStatus for possible values.
- error
An error object describing any error that has occurred during scene loading, or
nilif no errors has been encountered.- stopLoading
A reference to a Boolean value. Set
*stopto true within the block to abort further processing of the scene source’s contents.