# SetExcludeFromAnyPlatform

> Exclude platform from compatible platforms when Any Platform is set to true.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.0/script-reference/unityeditor.md)
* **Assembly:** UnityEditor

## SetExcludeFromAnyPlatform(string, bool)

Exclude platform from compatible platforms when **Any Platform** is set to true.

```csharp
public void SetExcludeFromAnyPlatform(string platformName, bool excludedFromAny)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Target platform.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)):&#x20;

### Remarks

Useful when you want to apply logic - "plugin is compatible with any platform except this platform".

Note: [PluginImporter.SetCompatibleWithPlatform](/engine/6000.0/script-reference/unityeditor/pluginimporter/setcompatiblewithplatform.md) or [PluginImporter.SetCompatibleWithEditor](/engine/6000.0/script-reference/unityeditor/pluginimporter/setcompatiblewitheditor.md) will override this setting.

You can also use [PluginImporter.GetImporters](/engine/6000.0/script-reference/unityeditor/pluginimporter/getimporters.md) to check whether or not your plugin is compatible with specific platforms.

## SetExcludeFromAnyPlatform(BuildTarget, bool)

Exclude platform from compatible platforms when **Any Platform** is set to true.

```csharp
public void SetExcludeFromAnyPlatform(BuildTarget platform, bool excludedFromAny)
```

### Parameters

**** (\[BuildTarget]\(/engine/6000.0/script-reference/unityeditor/buildtarget)): **** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)):&#x20;

### Remarks

Useful when you want to apply logic - "plugin is compatible with any platform except this platform".

Note: [PluginImporter.SetCompatibleWithPlatform](/engine/6000.0/script-reference/unityeditor/pluginimporter/setcompatiblewithplatform.md) or [PluginImporter.SetCompatibleWithEditor](/engine/6000.0/script-reference/unityeditor/pluginimporter/setcompatiblewitheditor.md) will override this setting.

You can also use [PluginImporter.GetImporters](/engine/6000.0/script-reference/unityeditor/pluginimporter/getimporters.md) to check whether or not your plugin is compatible with specific platforms.
