docs.unity3d.com
    Show / Hide Table of Contents

    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 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 UnityEngine.AdaptivePerformance.AdaptivePerformanceManagerSettings.StartSubsystems and UnityEngine.AdaptivePerformance.AdaptivePerformanceManagerSettings.StopSubsystems APIs.

    Unity executes atomatic lifecycle management as follows:

    • OnEnable calls UnityEngine.AdaptivePerformance.AdaptivePerformanceManagerSettings.InitializeLoader internally. The loader list will be iterated over and the first successful loader will be set as the active loader.
    • Start calls UnityEngine.AdaptivePerformance.AdaptivePerformanceManagerSettings.StartSubsystems internally. Ask the active loader to start all subsystems.
    • OnDisable calls UnityEngine.AdaptivePerformance.AdaptivePerformanceManagerSettings.StopSubsystems internally. Ask the active loader to stop all subsystems.
    • OnDestroy calls UnityEngine.AdaptivePerformance.AdaptivePerformanceManagerSettings.DeinitializeLoader internally. Deinitialize and remove the active loader.
    Inheritance
    Object
    UnityEngine.Object
    UnityEngine.ScriptableObject
    AdaptivePerformanceManagerSettings
    Inherited Members
    UnityEngine.ScriptableObject.SetDirty()
    UnityEngine.ScriptableObject.CreateInstance(System.String)
    UnityEngine.ScriptableObject.CreateInstance(System.Type)
    UnityEngine.ScriptableObject.CreateInstance<T>()
    UnityEngine.Object.GetInstanceID()
    UnityEngine.Object.GetHashCode()
    UnityEngine.Object.Equals(System.Object)
    UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Vector3, UnityEngine.Quaternion)
    UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Vector3, UnityEngine.Quaternion, UnityEngine.Transform)
    UnityEngine.Object.Instantiate(UnityEngine.Object)
    UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Transform)
    UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Transform, System.Boolean)
    UnityEngine.Object.Instantiate<T>(T)
    UnityEngine.Object.Instantiate<T>(T, UnityEngine.Vector3, UnityEngine.Quaternion)
    UnityEngine.Object.Instantiate<T>(T, UnityEngine.Vector3, UnityEngine.Quaternion, UnityEngine.Transform)
    UnityEngine.Object.Instantiate<T>(T, UnityEngine.Transform)
    UnityEngine.Object.Instantiate<T>(T, UnityEngine.Transform, System.Boolean)
    UnityEngine.Object.Destroy(UnityEngine.Object, System.Single)
    UnityEngine.Object.Destroy(UnityEngine.Object)
    UnityEngine.Object.DestroyImmediate(UnityEngine.Object, System.Boolean)
    UnityEngine.Object.DestroyImmediate(UnityEngine.Object)
    UnityEngine.Object.FindObjectsOfType(System.Type)
    UnityEngine.Object.FindObjectsOfType(System.Type, System.Boolean)
    UnityEngine.Object.DontDestroyOnLoad(UnityEngine.Object)
    UnityEngine.Object.DestroyObject(UnityEngine.Object, System.Single)
    UnityEngine.Object.DestroyObject(UnityEngine.Object)
    UnityEngine.Object.FindSceneObjectsOfType(System.Type)
    UnityEngine.Object.FindObjectsOfTypeIncludingAssets(System.Type)
    UnityEngine.Object.FindObjectsOfType<T>()
    UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
    UnityEngine.Object.FindObjectOfType<T>()
    UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
    UnityEngine.Object.FindObjectsOfTypeAll(System.Type)
    UnityEngine.Object.FindObjectOfType(System.Type)
    UnityEngine.Object.FindObjectOfType(System.Type, System.Boolean)
    UnityEngine.Object.ToString()
    UnityEngine.Object.name
    UnityEngine.Object.hideFlags
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEngine.AdaptivePerformance
    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
    AdaptivePerformanceLoader

    automaticLoading

    Get and set Automatic Loading state for this manager. When this is true, the manager will automatically call UnityEngine.AdaptivePerformance.AdaptivePerformanceManagerSettings.InitializeLoader and UnityEngine.AdaptivePerformance.AdaptivePerformanceManagerSettings.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.

    Declaration
    public bool automaticLoading { get; set; }
    Property Value
    Type Description
    Boolean

    automaticRunning

    Get and set the automatic running state for this manager. When this is true, the manager will call UnityEngine.AdaptivePerformance.AdaptivePerformanceManagerSettings.StartSubsystems and UnityEngine.AdaptivePerformance.AdaptivePerformanceManagerSettings.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.

    Declaration
    public bool automaticRunning { get; set; }
    Property Value
    Type Description
    Boolean

    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
    Boolean

    loaders

    List of loaders currently managed by this Adaptive Performance Manager instance.

    Declaration
    public List<AdaptivePerformanceLoader> loaders { get; }
    Property Value
    Type Description
    List<AdaptivePerformanceLoader>

    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.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023