Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


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 AdaptivePerformanceGeneralSettings instance for its use. 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 _activeLoader property on the manager. Depending on configuration, the AdaptivePerformanceGeneralSettings instance will automatically manage the active loader at the correct points in the application lifecycle. You can override certain points in the active loader lifecycle and manually manage them by toggling the _automaticLoading and _automaticRunning properties. Disabling _automaticLoading implies that you are responsible for the full lifecycle of the Adaptive Performance session normally handled by the AdaptivePerformanceGeneralSettings instance. Setting this to false also sets _automaticRunning to false. Disabling _automaticRunning only implies that you are responsible for starting and stopping the _activeLoader through the StartSubsystems and StopSubsystems APIs. Unity executes atomatic lifecycle management as follows: " OnEnable calls InitializeLoader internally. The loader list will be iterated over and the first successful loader will be set as the active loader. " Start calls StartSubsystems internally. Ask the active loader to start all subsystems. " OnDisable calls StopSubsystems internally. Ask the active loader to stop all subsystems. " OnDestroy calls DeinitializeLoader internally. Deinitialize and remove the active loader.
Read time 6 minutesLast updated 4 days ago

Definition

public sealed class AdaptivePerformanceManagerSettings : ScriptableObject

Properties

Property

Description

activeLoaderReturns the current singleton active loader instance.
automaticLoadingGet and set Automatic Loading state for this manager. When this is true, the manager will automatically call InitializeLoader and DeinitializeLoader for you. When false, _automaticRunning is also set to false and remains that way. This means that disabling automatic loading disables all automatic behavior for the manager.
automaticRunningGet and set the automatic running state for this manager. When this is true, the manager will call StartSubsystems and StopSubsystems APIs at appropriate times. When false, or when _automaticLoading is false, it is up to the user of the manager to handle that same functionality.
isInitializationCompleteRead-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.
loadersList of loaders currently managed by this Adaptive Performance Manager instance.

Methods

Method

Description

ActiveLoaderAsReturns 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.

Inheritance

Inherited Members

Operators

Operator

Description

operator ==Compares two object references to see if they refer to the same object.
boolDetermines whether the object exists.
operator !=Compares if two objects refer to a different object.