Method LoadSceneAsync
LoadSceneAsync(object, LoadSceneMode, bool, int, SceneReleaseMode)
Loads an Addressable Scene asset.
Declaration
public static AsyncOperationHandle<SceneInstance> LoadSceneAsync(object key, LoadSceneMode loadMode = LoadSceneMode.Single, bool activateOnLoad = true, int priority = 100, SceneReleaseMode releaseMode = SceneReleaseMode.ReleaseSceneWhenSceneUnloaded)
Parameters
Type | Name | Description |
---|---|---|
object | key | The key of the location of the scene to load. |
LoadSceneMode | loadMode | Scene load mode. |
bool | activateOnLoad | If false, the scene will load but not activate (for background loading). The SceneInstance returned has an Activate() method that can be called to do this at a later point. |
int | priority | Async operation priority for scene loading. |
SceneReleaseMode | releaseMode |
Returns
Type | Description |
---|---|
AsyncOperationHandle<SceneInstance> | The operation handle for the request. |
Remarks
The loadMode
, activateOnLoad
, and priority
parameters correspond to
the parameters used in the Unity SceneManager.LoadSceneAsync
method.
See Loading Scenes for more details.
LoadSceneAsync(object, LoadSceneMode, SceneReleaseMode, bool, int)
Loads an Addressable Scene asset.
Declaration
public static AsyncOperationHandle<SceneInstance> LoadSceneAsync(object key, LoadSceneMode loadMode, SceneReleaseMode releaseMode, bool activateOnLoad = true, int priority = 100)
Parameters
Type | Name | Description |
---|---|---|
object | key | The key of the location of the scene to load. |
LoadSceneMode | loadMode | Scene load mode. |
SceneReleaseMode | releaseMode | How the scene is handled if it is unloaded due to another scene loading using single mode. |
bool | activateOnLoad | If false, the scene will load but not activate (for background loading). The SceneInstance returned has an Activate() method that can be called to do this at a later point. |
int | priority | Async operation priority for scene loading. |
Returns
Type | Description |
---|---|
AsyncOperationHandle<SceneInstance> | The operation handle for the request. |
Remarks
The loadMode
, activateOnLoad
, and priority
parameters correspond to
the parameters used in the Unity SceneManager.LoadSceneAsync
method.
See Loading Scenes for more details.
LoadSceneAsync(object, LoadSceneParameters, bool, int)
Loads an Addressable Scene asset.
Declaration
public static AsyncOperationHandle<SceneInstance> LoadSceneAsync(object key, LoadSceneParameters loadSceneParameters, bool activateOnLoad = true, int priority = 100)
Parameters
Type | Name | Description |
---|---|---|
object | key | The key of the location of the scene to load. |
LoadSceneParameters | loadSceneParameters | Scene load mode. |
bool | activateOnLoad | If false, the scene will load but not activate (for background loading). The SceneInstance returned has an Activate() method that can be called to do this at a later point. |
int | priority | Async operation priority for scene loading. |
Returns
Type | Description |
---|---|
AsyncOperationHandle<SceneInstance> | The operation handle for the request. |
LoadSceneAsync(object, LoadSceneParameters, SceneReleaseMode, bool, int)
Loads an Addressable Scene asset.
Declaration
public static AsyncOperationHandle<SceneInstance> LoadSceneAsync(object key, LoadSceneParameters loadSceneParameters, SceneReleaseMode releaseMode, bool activateOnLoad = true, int priority = 100)
Parameters
Type | Name | Description |
---|---|---|
object | key | The key of the location of the scene to load. |
LoadSceneParameters | loadSceneParameters | Scene load mode. |
SceneReleaseMode | releaseMode | How the scene is handled if it is unloaded due to another scene loading using single mode. |
bool | activateOnLoad | If false, the scene will load but not activate (for background loading). The SceneInstance returned has an Activate() method that can be called to do this at a later point. |
int | priority | Async operation priority for scene loading. |
Returns
Type | Description |
---|---|
AsyncOperationHandle<SceneInstance> | The operation handle for the request. |
LoadSceneAsync(IResourceLocation, LoadSceneMode, bool, int)
Loads an Addressable Scene asset.
Declaration
public static AsyncOperationHandle<SceneInstance> LoadSceneAsync(IResourceLocation location, LoadSceneMode loadMode = LoadSceneMode.Single, bool activateOnLoad = true, int priority = 100)
Parameters
Type | Name | Description |
---|---|---|
IResourceLocation | location | The location of the scene to load. |
LoadSceneMode | loadMode | Scene load mode. |
bool | activateOnLoad | If false, the scene will load but not activate (for background loading). The SceneInstance returned has an Activate() method that can be called to do this at a later point. |
int | priority | Async operation priority for scene loading. |
Returns
Type | Description |
---|---|
AsyncOperationHandle<SceneInstance> | The operation handle for the request. |
LoadSceneAsync(IResourceLocation, LoadSceneMode, SceneReleaseMode, bool, int)
Loads an Addressable Scene asset.
Declaration
public static AsyncOperationHandle<SceneInstance> LoadSceneAsync(IResourceLocation location, LoadSceneMode loadMode, SceneReleaseMode releaseMode, bool activateOnLoad = true, int priority = 100)
Parameters
Type | Name | Description |
---|---|---|
IResourceLocation | location | The location of the scene to load. |
LoadSceneMode | loadMode | Scene load mode. |
SceneReleaseMode | releaseMode | How the scene is handled if it is unloaded due to another scene loading using single mode. |
bool | activateOnLoad | If false, the scene will load but not activate (for background loading). The SceneInstance returned has an Activate() method that can be called to do this at a later point. |
int | priority | Async operation priority for scene loading. |
Returns
Type | Description |
---|---|
AsyncOperationHandle<SceneInstance> | The operation handle for the request. |
LoadSceneAsync(IResourceLocation, LoadSceneParameters, bool, int)
Loads an Addressable Scene asset.
Declaration
public static AsyncOperationHandle<SceneInstance> LoadSceneAsync(IResourceLocation location, LoadSceneParameters loadSceneParameters, bool activateOnLoad = true, int priority = 100)
Parameters
Type | Name | Description |
---|---|---|
IResourceLocation | location | The location of the scene to load. |
LoadSceneParameters | loadSceneParameters | Scene load parameters. |
bool | activateOnLoad | If false, the scene will load but not activate (for background loading). The SceneInstance returned has an Activate() method that can be called to do this at a later point. |
int | priority | Async operation priority for scene loading. |
Returns
Type | Description |
---|---|
AsyncOperationHandle<SceneInstance> | The operation handle for the request. |
LoadSceneAsync(IResourceLocation, LoadSceneParameters, SceneReleaseMode, bool, int)
Loads an Addressable Scene asset.
Declaration
public static AsyncOperationHandle<SceneInstance> LoadSceneAsync(IResourceLocation location, LoadSceneParameters loadSceneParameters, SceneReleaseMode releaseMode, bool activateOnLoad = true, int priority = 100)
Parameters
Type | Name | Description |
---|---|---|
IResourceLocation | location | The location of the scene to load. |
LoadSceneParameters | loadSceneParameters | Scene load parameters. |
SceneReleaseMode | releaseMode | How the scene is handled if it is unloaded due to another scene loading using single mode. |
bool | activateOnLoad | If false, the scene will load but not activate (for background loading). The SceneInstance returned has an Activate() method that can be called to do this at a later point. |
int | priority | Async operation priority for scene loading. |
Returns
Type | Description |
---|---|
AsyncOperationHandle<SceneInstance> | The operation handle for the request. |