Class AdaptivePerformanceManagerSettings
Class to handle active loader and subsystem management for Adaptive Performance. This class is to be added as a
ScriptableObject asset in your project and should only be referenced by an Adaptive
Given a list of loaders, it will attempt to load each loader in the given order. Unity will use the first
loader that is successful and ignore all remaining loaders. The successful loader
is accessible through the active
Depending on configuration, the Adaptive
Disabling automatic
Unity executes atomatic lifecycle management as follows:
- OnEnable calls Initialize
Loader() internally. The loader list will be iterated over and the first successful loader will be set as the active loader. - Start calls Start
Subsystems() internally. Ask the active loader to start all subsystems. - OnDisable calls Stop
Subsystems() internally. Ask the active loader to stop all subsystems. - OnDestroy calls Deinitialize
Loader() internally. Deinitialize and remove the active loader.
Inherited Members
Namespace: UnityEngine .AdaptivePerformance
Assembly: Unity.AdaptivePerformance.dll
Syntax
public sealed class AdaptivePerformanceManagerSettings : ScriptableObject
Properties
activeLoader
Returns the current singleton active loader instance.
Declaration
[HideInInspector]
public AdaptivePerformanceLoader activeLoader { get; }
Property Value
Type | Description |
---|---|
Adaptive |
automaticLoading
Get and set Automatic Loading state for this manager. When this is true, the manager will automatically call
Initialize
Declaration
public bool automaticLoading { get; set; }
Property Value
Type | Description |
---|---|
bool |
automaticRunning
Get and set the automatic running state for this manager. When this is true, the manager will call Start
Declaration
public bool automaticRunning { get; set; }
Property Value
Type | Description |
---|---|
bool |
isInitializationComplete
Read-only boolean that is true if initialization is completed and false otherwise. Because initialization is handled as a Coroutine, applications that use the auto-lifecycle management of AdaptivePerformanceManager will need to wait for init to complete before checking for an ActiveLoader and calling StartSubsystems.
Declaration
public bool isInitializationComplete { get; }
Property Value
Type | Description |
---|---|
bool |
loaders
List of loaders currently managed by this Adaptive Performance Manager instance.
Declaration
public List<AdaptivePerformanceLoader> loaders { get; set; }
Property Value
Type | Description |
---|---|
List<Adaptive |
Methods
ActiveLoaderAs<T>()
Returns the current active loader, cast to the requested type. Useful shortcut when you need to get the active loader as something less generic than AdaptivePerformanceLoader.
Declaration
public T ActiveLoaderAs<T>() where T : AdaptivePerformanceLoader
Returns
Type | Description |
---|---|
T | The active loader as requested type, or null if no active loader currently exists. |
Type Parameters
Name | Description |
---|---|
T | Requested type of the loader. |