Editar

Compartilhar via


IMixedRealitySceneSystem.LoadContent Method

Definition

Overloads

LoadContent(IEnumerable<String>, LoadSceneMode, SceneActivationToken)

Async method to load the scenes by name. If a scene operation is in progress, no action will be taken.

LoadContent(String, LoadSceneMode, SceneActivationToken)

Async method to load a single scene by name. If a scene operation is in progress, no action will be taken.

LoadContent(IEnumerable<String>, LoadSceneMode, SceneActivationToken)

Async method to load the scenes by name. If a scene operation is in progress, no action will be taken.

public System.Threading.Tasks.Task LoadContent (System.Collections.Generic.IEnumerable<string> scenesToLoad, UnityEngine.SceneManagement.LoadSceneMode mode = UnityEngine.SceneManagement.LoadSceneMode.Additive, Microsoft.MixedReality.Toolkit.SceneSystem.SceneActivationToken activationToken = default);
abstract member LoadContent : seq<string> * UnityEngine.SceneManagement.LoadSceneMode * Microsoft.MixedReality.Toolkit.SceneSystem.SceneActivationToken -> System.Threading.Tasks.Task
Public Function LoadContent (scenesToLoad As IEnumerable(Of String), Optional mode As LoadSceneMode = UnityEngine.SceneManagement.LoadSceneMode.Additive, Optional activationToken As SceneActivationToken = Nothing) As Task

Parameters

scenesToLoad
IEnumerable<String>

Names of content scenes to load. Invalid scenes will be ignored.

mode
UnityEngine.SceneManagement.LoadSceneMode

Additive mode will load the content additively. Single mode will first unload all loaded content scenes first.

activationToken
SceneActivationToken

Optional token for manual scene activation. Useful for loading screens and multiplayer. If not null, operation will wait until activationToken's AllowSceneActivation value is true before activating scene objects.

Returns

Task

Applies to

LoadContent(String, LoadSceneMode, SceneActivationToken)

Async method to load a single scene by name. If a scene operation is in progress, no action will be taken.

public System.Threading.Tasks.Task LoadContent (string sceneToLoad, UnityEngine.SceneManagement.LoadSceneMode mode = UnityEngine.SceneManagement.LoadSceneMode.Additive, Microsoft.MixedReality.Toolkit.SceneSystem.SceneActivationToken activationToken = default);
abstract member LoadContent : string * UnityEngine.SceneManagement.LoadSceneMode * Microsoft.MixedReality.Toolkit.SceneSystem.SceneActivationToken -> System.Threading.Tasks.Task
Public Function LoadContent (sceneToLoad As String, Optional mode As LoadSceneMode = UnityEngine.SceneManagement.LoadSceneMode.Additive, Optional activationToken As SceneActivationToken = Nothing) As Task

Parameters

sceneToLoad
String

Name of content scene to load. Invalid scenes will be ignored.

mode
UnityEngine.SceneManagement.LoadSceneMode

Additive mode will load the content additively. Single mode will first unload all loaded content scenes first.

activationToken
SceneActivationToken

Optional token for manual scene activation. Useful for loading screens and multiplayer. If not null, operation will wait until activationToken's AllowSceneActivation value is true before activating scene objects.

Returns

Task

Applies to