# IsEnabled()

> Override this method to control whether Unity uses this hardware profile during the Android build.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.Android](/engine/6000.6/script-reference/unityeditor/android.md)
* **Assembly:** UnityEditor.Android.Extensions

```csharp
public virtual bool IsEnabled()
```

### Returns

| Type                                                          | Description |
| ------------------------------------------------------------- | ----------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) |             |

### Remarks

Unity calls this method during the build process to determine which [AndroidHardwareProfiles](/engine/6000.6/script-reference/unityeditor/android/androidhardwareprofiles.md) implementation to use. Return `true` to include this profile in the build, or `false` to skip it. The default implementation returns `true`.

Override this method to conditionally enable a profile based on build settings, target platform, or other criteria. This is useful when you maintain multiple profile implementations and want to switch between them without removing code.

**Note**: Only one [AndroidHardwareProfiles](/engine/6000.6/script-reference/unityeditor/android/androidhardwareprofiles.md) implementation can be enabled at a time. If multiple implementations return `true`, Unity throws an exception during the build.

Returns `true` if this profile should be used for the build; otherwise, `false`.

Additional Resources: [AndroidHardwareProfiles.DefineHardwareProfile](/engine/6000.6/script-reference/unityeditor/android/androidhardwareprofiles/definehardwareprofile.md), [Vulkan hardware profiles](/engine/6000.6/manual/platform-specific/android/developing/graphics/vulkan-hardware-profiles.md).

### Examples

```csharp
using UnityEditor;
using UnityEditor.Android;
using UnityEditor.HardwareProfiles;

public class PrimaryHardwareProfile : AndroidHardwareProfiles
{
    // Enable profile for production build
    public override bool IsEnabled() => EditorUserBuildSettings.development == false;
    public override void DefineHardwareProfile(ProfileDatabase database)
    {
        // Configure the default filter for all devices
        var defaultFilter = database.GetDefaultFilter();
        defaultFilter.SetGraphicsAPI(GraphicsAPI.UseVulkan);
    }
}

public class AditionalHardwareProfile : AndroidHardwareProfiles
{
    // Enable profile for development build
    public override bool IsEnabled() => EditorUserBuildSettings.development == true;
    public override void DefineHardwareProfile(ProfileDatabase database)
    {
        // Configure the default filter for all devices
        var defaultFilter = database.GetDefaultFilter();
        defaultFilter.SetGraphicsAPI(GraphicsAPI.UseOpenGles);
    }
}
```
