Class LoaderUtility
A utility for interacting with an XRLoader
from
XR Management.
Inherited Members
Namespace: UnityEngine.XR.ARFoundation
Syntax
public static class LoaderUtility
Remarks
XR Management controls the lifecycle of subsystems. Components in AR Foundation, such as ARSession
or
ARPlaneManager
, turn subsystems on and off, but do not create or destroy them. Therefore, subsystems
can persist across many scenes. They are automatically created on app startup, but are not destroyed
during a scene switch. This allows you to keep the same session alive between scenes, for example.
Methods
Deinitialize()
Deinitializes the currently active XR Loader
, if one exists. This destroys all subsystems.
Declaration
public static bool Deinitialize()
Returns
Type | Description |
---|---|
Boolean | Returns |
GetActiveLoader()
Get the 'active' loader from XR Management.
Declaration
public static XRLoader GetActiveLoader()
Returns
Type | Description |
---|---|
XRLoader | Returns the currently active |
Initialize()
Initializes the currently active XR Loader
, if one exists. This creates all subsystems.
Declaration
public static bool Initialize()
Returns
Type | Description |
---|---|
Boolean | Returns |