文档

Unity Engine

Unity Engine

SetExcludeFromAnyPlatform

Sets whether a platform, identified by name, is excluded when the plug-in is compatible with any platform.
阅读时间1 分钟最后更新于 21 天前

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor.CoreModule

SetExcludeFromAnyPlatform(string, bool)

Sets whether a platform, identified by name, is excluded when the plug-in is compatible with any platform.
public void SetExcludeFromAnyPlatform(string platformName, bool excludedFromAny)

Parameters

platformName

The name of the target platform.

excludedFromAny

Set to true to exclude the platform. Set to false to include it.

Remarks

When Any Platform is enabled for a plug-in, it's compatible with every platform except the ones you exclude. Use this method when a plug-in is compatible with every platform except a few. PluginImporter.SetCompatibleWithPlatform and PluginImporter.SetCompatibleWithEditor override this setting. To check which plug-ins are compatible with a platform, use PluginImporter.GetImporters.

SetExcludeFromAnyPlatform(BuildTarget, bool)

Sets whether a build target is excluded when the plug-in is compatible with any platform.
public void SetExcludeFromAnyPlatform(BuildTarget platform, bool excludedFromAny)

Parameters

platform

The target platform.

excludedFromAny

Set to true to exclude the platform. Set to false to include it.

Remarks

When Any Platform is enabled for a plug-in, it's compatible with every platform except the ones you exclude. Use this method when a plug-in is compatible with every platform except a few. PluginImporter.SetCompatibleWithPlatform and PluginImporter.SetCompatibleWithEditor override this setting. To check which plug-ins are compatible with a platform, use PluginImporter.GetImporters.