Version: 2022.3
言語: 日本語
public static void RemoveGroup (string groupName);

パラメーター

groupName Name of the texture mipmap limit group to remove.

説明

(Editor Only) Attempts to remove a texture mipmap limit group with the indicated groupName.

This operation fails and throws an exception if groupName is null or there is no texture mipmap limit group named groupName. If Unity finds a matching group, Unity removes it from all quality levels.

Unity does not modify textures bound to the removed group. These textures continue to point to the removed group as long as you do not update and re-import them yourself. If you do not adjust the relevant textures, they automatically fall back to the global texture mipmap limit.

#if UNITY_EDITOR
using UnityEngine;
using UnityEditor;

public class Example : MonoBehaviour { // Attempts to remove the texture mipmap limit group "MyGroup", if it exists in the project. [MenuItem("MyMenu/Remove TextureMipmapLimitGroup")] static void RemoveMyGroup() { const string textureMipmapLimitGroupName = "MyGroup"; if (TextureMipmapLimitGroups.HasGroup(textureMipmapLimitGroupName)) { TextureMipmapLimitGroups.RemoveGroup(textureMipmapLimitGroupName); } else { Debug.LogError($"Cannot remove texture mipmap limit group '{textureMipmapLimitGroupName}' as it does not exist!"); } } } #endif

See Also: HasGroup, CreateGroup.

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