Class Performance
Performance settings
Inherited Members
Namespace: Unity.XR.Oculus
Assembly: Unity.XR.Oculus.dll
Syntax
public static class Performance
Methods
TryGetAvailableDisplayRefreshRates(out float[])
Get an array of available display frequencies supported by this hardware.
Declaration
public static bool TryGetAvailableDisplayRefreshRates(out float[] refreshRates)
Parameters
Type | Name | Description |
---|---|---|
float[] | refreshRates | populated list of available refresh rates |
Returns
Type | Description |
---|---|
bool | true if able to populate the refresh rates |
TryGetDisplayRefreshRate(out float)
Get the current display frequency.
Declaration
public static bool TryGetDisplayRefreshRate(out float refreshRate)
Parameters
Type | Name | Description |
---|---|---|
float | refreshRate | A variable to receive the current refresh rate. |
Returns
Type | Description |
---|---|
bool |
|
TrySetCPULevel(int)
Set the CPU Level for the device
Declaration
public static bool TrySetCPULevel(int level)
Parameters
Type | Name | Description |
---|---|---|
int | level | Allowable values are integers in the range 0 - 4 (inclusive). A value of 0 is the lowest performance level but is the most power efficient. Please note: as this is a hint, it may not be immediately reflected by the system. |
Returns
Type | Description |
---|---|
bool | True if we have no errors returned by the native function. We return false when the native function returns a failure condition. Check the log for more information. |
TrySetDisplayRefreshRate(float)
Set the current display frequency.
Declaration
public static bool TrySetDisplayRefreshRate(float refreshRate)
Parameters
Type | Name | Description |
---|---|---|
float | refreshRate | The requested refresh rate |
Returns
Type | Description |
---|---|
bool | true if able to successfully set the refresh rate |
TrySetGPULevel(int)
Set the GPU performance level
Declaration
public static bool TrySetGPULevel(int level)
Parameters
Type | Name | Description |
---|---|---|
int | level | Allowable values are integers in the range 0 - 4 (inclusive). A value of 0 is the lowest performance level but is the most power efficient. Please note: as this is a hint, it may not be immediately reflected by the system. |
Returns
Type | Description |
---|---|
bool | True if we have no errors returned by the native function. We return false when the native function returns a failure condition. Check the log for more information. |