Version: Unity 6.3 Beta (6000.3)
LanguageEnglish
  • C#

AdaptivePerformanceManagerSettings

class in UnityEngine.AdaptivePerformance

/

Inherits from:ScriptableObject

/

Implemented in:UnityEngine.AdaptivePerformanceModule

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

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 AdaptivePerformanceManagerSettings.automaticLoading and AdaptivePerformanceManagerSettings.automaticRunning properties. Disabling AdaptivePerformanceManagerSettings.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 AdaptivePerformanceManagerSettings.automaticRunning to false.

Disabling AdaptivePerformanceManagerSettings.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.

Properties

Property Description
activeLoader Returns the current singleton active loader instance.
automaticLoading Get 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.
automaticRunning Get 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.
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.
loaders List of loaders currently managed by this Adaptive Performance Manager instance.

Public Methods

Method Description
ActiveLoaderAs 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.

Inherited Members

Properties

PropertyDescription
hideFlagsShould the object be hidden, saved with the Scene or modifiable by the user?
nameThe name of the object.

Public Methods

MethodDescription
GetInstanceIDGets the instance ID of the object.
ToStringReturns the name of the object.

Static Methods

MethodDescription
DestroyRemoves a GameObject, component or asset.
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoadDo not destroy the target Object when loading a new Scene.
FindAnyObjectByTypeRetrieves any active loaded object of Type type.
FindFirstObjectByTypeRetrieves the first active loaded object of Type type.
FindObjectsByTypeRetrieves a list of all loaded objects of Type type.
InstantiateClones the object original and returns the clone.
InstantiateAsyncCaptures a snapshot of the original object (that must be related to some GameObject) and returns the AsyncInstantiateOperation.
CreateInstanceCreates an instance of a scriptable object.

Operators

OperatorDescription
boolDoes the object exist?
operator !=Compares if two objects refer to a different object.
operator ==Compares two object references to see if they refer to the same object.

Messages

MessageDescription
AwakeCalled when an instance of ScriptableObject is created.
OnDestroyThis function is called when the scriptable object will be destroyed.
OnDisableThis function is called when the scriptable object goes out of scope.
OnEnableThis function is called when the object is loaded.
OnValidateEditor-only function that Unity calls when the script is loaded or a value changes in the Inspector.
ResetReset to default values.