Version: 2022.2
言語: 日本語
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.