buildTargetGroupName | 平台名称。 |
index | 质量级别索引,必须为正数且小于质量级别计数。 |
error | API 发现的错误。 |
bool 如果发现错误。
[仅限编辑器] 包含质量级别支持的平台。
public void IncludeQualityLevelForPlatform(int qualityLevelToExclude, BuildTarget platformToExclude) { var activeBuildTargetGroup = BuildPipeline.GetBuildTargetGroup(platformToExclude); var namedBuildTarget = NamedBuildTarget.FromBuildTargetGroup(activeBuildTargetGroup); bool result = QualitySettings.TryIncludePlatformAt(namedBuildTarget.TargetName, qualityLevelToExclude, out var ex); Debug.Log(result ? "Successfully included the platform at the specified quality level." : $"Failed to include the platform. {ex.Message}"); }
在给定的质量级别中包含一个平台。