# SetPerformanceLevel(ref int, ref int)

> Request a performance level change. If UnknownPerformanceLevel is passed, the subsystem picks the level to be used.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.AdaptivePerformance.Provider](/engine/6000.3/script-reference/unityengine/adaptiveperformance/provider.md)
* **Assembly:** UnityEngine.AdaptivePerformanceModule

## SetPerformanceLevel(int, int)

```csharp
bool SetPerformanceLevel(ref int cpu, ref int gpu)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The new performance level. Can be UnknownPerformanceLevel or range of \[MinCpuPerformanceLevel, [IDevicePerformanceLevelControl.MaxCpuPerformanceLevel](/engine/6000.3/script-reference/unityengine/adaptiveperformance/provider/ideviceperformancelevelcontrol/maxcpuperformancelevel.md)]. If [Feature.CpuPerformanceLevel](/engine/6000.3/script-reference/unityengine/adaptiveperformance/provider/feature/cpuperformancelevel.md) is not supported (see [AdaptivePerformanceSubsystem.Capabilities](/engine/6000.3/script-reference/unityengine/adaptiveperformance/provider/adaptiveperformancesubsystem/capabilities.md)), this parameter is ignored.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The new performance level. Can be UnknownPerformanceLevel or range of \[MinCpuPerformanceLevel, [IDevicePerformanceLevelControl.MaxGpuPerformanceLevel](/engine/6000.3/script-reference/unityengine/adaptiveperformance/provider/ideviceperformancelevelcontrol/maxgpuperformancelevel.md)]. If [Feature.GpuPerformanceLevel](/engine/6000.3/script-reference/unityengine/adaptiveperformance/provider/feature/gpuperformancelevel.md) is not supported (see [AdaptivePerformanceSubsystem.Capabilities](/engine/6000.3/script-reference/unityengine/adaptiveperformance/provider/adaptiveperformancesubsystem/capabilities.md)), this parameter is ignored.

### Returns

| Type                                                          | Description                                                                                                       |
| ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns true on success. When this fails, it means that the system took control of the active performance levels. |
