Blitz3D+ Command Reference

LoadWorldDocumentAsync ( document[,flags] )

Parameters

document - world document handle

flags (optional) - WORLD_LOAD_DEFAULT (default) or WORLD_LOAD_NO_STREAMING

Description

Starts an asynchronous runtime-world load from a document snapshot.

The load is an ordinary asynchronous world load taken from an immutable snapshot of the current document, and returns a world handle. Later edits cannot change that in-flight load.

For the full story, see the Debug World Editor guide.

Requires Extended mode.

See also: LoadWorldAsync, LoadWorldDocument, WorldDocumentJson.

Example

; LoadWorldDocumentAsync Example - Extended mode
Graphics3D 320,200,0,2
document=CreateWorldDocument("preview-example","Preview Example")
If document=0 Then RuntimeError WorldDocumentError()
world=LoadWorldDocumentAsync(document,WORLD_LOAD_NO_STREAMING)
While Not WorldReady(world)
    If WorldLoadState(world)=WORLD_LOAD_FAILED Then RuntimeError WorldLoadError(world)
    UpdateAsyncLoads 1.0
    Delay 0
Wend
Print "Immutable runtime mirror is ready"
FreeWorld world
FreeWorldDocument document
EndGraphics
End

Index