1.79.1 SceneTransition. ExitScript .676 1.79.2 SceneTransition.GetDestinationScene .677 1.79.3 SceneTransition.GetObject .677 1.79.4 SceneTransition.GetOriginScene .678 1.79.5 SceneTransition.GetSceneChangeProgress.678 1.79.6 SceneTransition.IsSceneChangeComplete .679 1.79.7 SceneTransition.StartSceneChange .679 1.77 SceneDownload .671 1.77.1 SceneDownload.CancelDownload .671 1.77.2 SceneDownload.GetCurrentDownload .671 1.77.3 SceneDownload.GetDownloadProgress .672 1.77.4 SceneDownload.GetDownloadSize .673 1.77.5 SceneDownload.QuerySceneCacheStatus .673 1.77.6 SceneDownload.StartDownload .674 SceneTransition SceneT ransition.ExitScript Brief Terminates the SceneTransition object. Definition ! SceneTransition.ExitScript () Arguments None Return Values None. Description This function must be called when the scene transition object has finished its execution to release the object and hand control over to the user. Examples ! if (SceneTransition.IsSceneChangeComplete()) then SceneTransition.ExitScript () | end See Also None SceneTransition.GetDestinationScene Brief Returns the name of the destination scene for a scene transition. Definition ! string SceneTransition.GetDestinationScene() Arguments None Return Values The scene name. Description Returns the name of the destination scene for a scene transition. Examples ! local scene = SceneTransition.GetDestinationScene() See Also • SceneTransition.GetOriginScene SceneT ransition.GetObject Brief Returns the SceneTransition object (if it is running). Definition ! Object SceneTransition.GetObject() Arguments None Return Values SceneTransition object if it is running, or nil otherwise. Description Returns the SceneTransition object if a relocation process is occurring. Examples ! local object = SceneTransition.GetObject() See Also None SceneT ransition.GetOriginScene Brief Returns the name of the scene that started the scene transition. Definition ! string SceneTransition.GetOriginScene() Arguments None Return Values The scene name. Description Returns the name of the scene that started the scene transition. Examples 1 local scene = SceneTransition.GetOriginScene () See Also • SceneTransition.GetDestinationScene SceneT ransition.GetSceneChangeProgress Brief Returns a value indicating the progress of the current relocation from 0.0 to 1.0. Definition ! number SceneTransition.GetSceneChangeProgress() Arguments None Return Values A value between 0 and 1 indicating the transition progress. Description Returns a value indicating the progress of the current relocation from 0.0 to 1.0. Examples ! local progress = SceneTransition.GetSceneChangeProgress() | RenderProgressBar(progress) — user function See Also None SceneTransition. IsSceneChangeComplete Brief Indicates when the scene change is fully complete and the new scene is ready to interact with. Definition ! boolean SceneTransition.IsSceneChangeComplete() Arguments None Return Values True if the scene change is complete, or false if still in progress. Description If the scene change has completed and the new scene is ready to interact with, this function will return true. Examples 1 if (SceneTransition.IsSceneChangeComplete()) then print("Scene ready!") | end See Also None SceneTransition.StartSceneChange Brief Begins the scene relocation process. Definition ! boolean SceneTransition.StartSceneChange() Arguments None Return Values True if scene change started successfully, false otherwise. Description Activates the scene relocation, removing the user from the current scene and starting the process of loading and moving to the new one. Examples if (SceneTransition.StartSceneChange()) then print("Scene change started!") j end SceneDownload SceneDownload.CancelDownload Brief Cancels the specified scripted scene download. Definition boolean SceneDownload.CancelDownload( string sceneName ) Arguments None Return Values True if download was cancelled, false otherwise. Description Only scene downloads triggered by script can be cancelled with this function. Examples if (SceneDownload.CancelDownload("myscene")) then print("Download cancelled") end See Also • SceneDownload.StartDownload SceneDownload.GetCurrentDownload Brief Returns the scripted scene download currently in progress (or nil if none is active). Definition string SceneDownload.GetCurrentDownload() Arguments None Return Values The current scene download, or nil if none is activate. Description Returns the scene name of the current scene download if one is active. Examples local scene = SceneDownload.GetCurrentDownload() if (scene) then print("Downloading " .. scene .. "...") end See Also • SceneDownload.StartDownload SceneDownload.GetDownloadProgress Brief Gets the progress value for the download of the requested scene. Definition number SceneDownload.GetDownloadProgress( string sceneName ) Arguments None Return Values A value between 0 (no data received) and 1 (all data received) indicating the progress of the download. Description Retrieves the progress proportion of the download of a specified scene. Examples ! local progress = SceneDownload.GetDownloadProgress("myscene") S RenderProgressBar(progress) — user function See Also • SceneDownload.StartDownload SceneDownload.GetDownloadSize Brief Gets the size of the download for the specified scene name, in bytes. Definition ! number SceneDownload.GetDownloadSize( string sceneName ) Arguments None Return Values The size in bytes of the specified scene download. Description Gets the size of the download for a specified scene. The download itself is not triggered. Examples ! local size = SceneDownload.GetDownloadSize("myscene") See Also None SceneDownload. QuerySceneCacheStatus Brief Queries whether the specified scene is currently cached and up-to-date. Definition SceneDownload.QuerySceneCacheStatus( string sceneName ) Arguments None Return Values One of the following result values: CacheCheckResult.Downloading - scene is downloading CacheCheckResult.InCache - scene is cached CacheCheckResult.NeedsDownload - scene is out of date and needs re-downloading CacheCheckResult.AccessRestricted - scene has failed age restriction or failed to download Description Queries whether the specified scene is currently cached and up-to-date. Examples if (SceneDownload.QuerySceneCacheStatus("myscene") == CacheCheckResult.InCache) then print("Scene is cached!") end See Also • SceneDownload.StartDownload SceneDownload.StartDownload Brief Starts a background download of the specified scene (if none is active). Definition boolean SceneDownload.StartDownload( string sceneName ) Arguments None Return Values True if the scene download was started successfully, false otherwise. Description Triggers a background download of the named scene. Any download that is in progress will be cancelled. Examples ! if (SceneDownload.StartDownload("myscene")) then print("Scene download triggered!") | end See Also • SceneDownload.GetCurrentDownload