Class AdaptivePerformanceSubsystem
A class to define a provider subsystem for Adaptive Performance.
Inheritance
Implements
Inherited Members
Namespace: UnityEngine .AdaptivePerformance .Provider
Assembly: Unity.AdaptivePerformance.dll
Syntax
public class AdaptivePerformanceSubsystem : AdaptivePerformanceSubsystemBase<AdaptivePerformanceSubsystem, AdaptivePerformanceSubsystemDescriptor, AdaptivePerformanceSubsystem.APProvider>, ISubsystem
Constructors
AdaptivePerformanceSubsystem()
Main constructor, not used in the subsystem specifically.
Declaration
public AdaptivePerformanceSubsystem()
Properties
ApplicationLifecycle
Lifecycle of the Subsystem.
Declaration
public override IApplicationLifecycle ApplicationLifecycle { get; }
Property Value
Type | Description |
---|---|
IApplication |
Overrides
Capabilities
Bitset of supported features. Does not change after startup.
Declaration
public override Feature Capabilities { get; protected set; }
Property Value
Type | Description |
---|---|
Feature | Bitset |
Overrides
Initialized
Returns if the subsystem is initialized successfully.
Declaration
public override bool Initialized { get; protected set; }
Property Value
Type | Description |
---|---|
bool | Boolean to tell if subsystem was initialized successfully. |
Overrides
PerformanceLevelControl
Control CPU or GPU performance levels of the device.
Can be null if the subsystem does not support controlling CPU/GPU performance levels.
Is null when the Performance
Declaration
public override IDevicePerformanceLevelControl PerformanceLevelControl { get; }
Property Value
Type | Description |
---|---|
IDevice |
Performance level control object |
Overrides
Stats
Generates a human readable string of subsystem internal stats. Optional and only used for development.
Declaration
public override string Stats { get; }
Property Value
Type | Description |
---|---|
string | String with subsystem specific statistics |
Overrides
Version
Returns the version of the subsystem implementation. Can be used together with SubsystemDescriptor to identify a subsystem.
Declaration
public override Version Version { get; }
Property Value
Type | Description |
---|---|
Version | Version number |
Overrides
Methods
Update()
To be called once per frame. The returned data structure's fields are populated with the latest available data, according to the supported Capabilities.
Declaration
public override PerformanceDataRecord Update()
Returns
Type | Description |
---|---|
Performance |
Data structure with the most recent performance data. |