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.

C#
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);

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

MRTK2 Unity 2018 2.7.0 a ďalšie verzie
Produkt Verzie
MRTK2 Unity 2018 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0
MRTK2 Unity 2019 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0
MRTK2 Unity 2020 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0

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.

C#
public System.Threading.Tasks.Task LoadContent (string sceneToLoad, UnityEngine.SceneManagement.LoadSceneMode mode = UnityEngine.SceneManagement.LoadSceneMode.Additive, Microsoft.MixedReality.Toolkit.SceneSystem.SceneActivationToken activationToken = default);

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

MRTK2 Unity 2018 2.7.0 a ďalšie verzie
Produkt Verzie
MRTK2 Unity 2018 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0
MRTK2 Unity 2019 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0
MRTK2 Unity 2020 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0