Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


IsPlatformIncluded(string, int)

[Editor Only] Returns if the given platform is included by the Quality Level.
Read time 1 minuteLast updated 10 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public static bool IsPlatformIncluded(string buildTargetGroupName, int index)

Parameters

buildTargetGroupName

The platform name.

index

The index of the Quality Level, must be positive and lower than the count of Quality Levels.

Returns

Type

Description

boolIf the platform is included.

Examples

public bool IsPlatformIcluded(BuildTarget platform, int index){ var activeBuildTargetGroup = BuildPipeline.GetBuildTargetGroup(platform); var namedBuildTarget = NamedBuildTarget.FromBuildTargetGroup(activeBuildTargetGroup); return QualitySettings.IsPlatformIncluded(namedBuildTarget.TargetName, index);}