WorldSourcesCurrent ( world )
Parameters
| world - ready authored world handle |
Description
Returns 1 when every file consumed while loading the world still has the same
contents and every optional file that was absent is still absent. Returns 0 if
any source changed, disappeared, or appeared. The check includes files loaded
through nested prefab and reusable-resource dependencies. It reads the files
again, so use it at an edit or save boundary rather than every frame. A world
that is still loading is rejected; call WorldReady first.
Requires Extended mode.
|
; WorldSourcesCurrent Example
; ---------------------------
; Requires Extended mode.
Graphics3D 640,480,0,2
scene=LoadWorldAsync("../../../samples/physics/physics-showcase.world")
While WorldReady(scene)=0
If WorldLoadState(scene)=WORLD_LOAD_FAILED Then RuntimeError WorldLoadError(scene)
UpdateAsyncLoads 2
Wend
If WorldSourcesCurrent(scene)=0 Then RuntimeError "A world source changed during loading"
Print "All loaded world sources are current"
FreeWorld scene
End