AdaptivePerformanceSubsystemBase<TSubsystem, TSubsystemDescriptor, TProvider>
Base class for subsystems to create your custom provider subsystem to deliver data from your provider to Adaptive Performance.
Read time 1 minuteLast updated 13 days ago
Definition
- Type: Class
- Namespace: UnityEngine.AdaptivePerformance.Provider
- Assembly: UnityEngine.AdaptivePerformanceModule
- Inherits from: SubsystemWithProvider<T, T, T>
- Implements: ISubsystem
public abstract class AdaptivePerformanceSubsystemBase<TSubsystem, TSubsystemDescriptor, TProvider> : SubsystemWithProvider<TSubsystem, TSubsystemDescriptor, TProvider>, ISubsystem where TSubsystem : SubsystemWithProvider, new() where TSubsystemDescriptor : SubsystemDescriptorWithProvider where TProvider : SubsystemProvider<TSubsystem>
Properties
Property | Description |
|---|---|
| ApplicationLifecycle | Application lifecycle events to be consumed by subsystem. Can be null if the subsystem does not need special handling on life-cycle events. The returned reference does not change after startup. |
| Capabilities | Bitset of supported features. Does not change after startup. |
| Initialized | Returns if the subsystem is initialized successfully. |
| 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 Feature.PerformanceLevelControl bit is not set in AdaptivePerformanceSubsystemBase<TSubsystem, TSubsystemDescriptor, TProvider>.Capabilities. The returned reference does not change after startup. |
| Stats | Generates a human readable string of subsystem internal stats. Optional and only used for development. |
| Version | Returns the version of the subsystem implementation. Can be used together with SubsystemDescriptor to identify a subsystem. |
Methods
Method | Description |
|---|---|
| Update | To be called once per frame. The returned data structure's fields are populated with the latest available data, according to the supported AdaptivePerformanceSubsystemBase<TSubsystem, TSubsystemDescriptor, TProvider>.Capabilities. |