Version: 2023.2
言語: 日本語
public static bool HasGroup (string groupName);

パラメーター

groupName Name of the texture mipmap limit group to verify.

戻り値

bool Returns true if a texture mipmap limit group named groupName exists in the project. If that is not the case, returns false.

説明

Checks whether a texture mipmap limit group with the indicated groupName exists in the project. This operation fails and throws an exception if groupName is null.

using UnityEngine;

public class Example : MonoBehaviour { // Checks if the texture mipmap limit group "MyGroup" exists in the project and prints a message to the Unity Console. void Start() { const string textureMipmapLimitGroupName = "MyGroup"; bool myGroupExists = TextureMipmapLimitGroups.HasGroup(textureMipmapLimitGroupName); Debug.Log($"Texture mipmap limit group '{textureMipmapLimitGroupName}' {(myGroupExists ? "exists" : "does not exist")} in this project."); } }

See Also: CreateGroup, RemoveGroup.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961