RemoveGroup(string)
(Editor Only) Attempts to remove a texture mipmap limit group with the indicated groupName.
Read time 1 minuteLast updated 5 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
public static void RemoveGroup(string groupName)
Parameters
Name of the texture mipmap limit group to remove.
Remarks
This operation fails and throws an exception if is null or there is no texture mipmap limit group named . If Unity finds a matching group, Unity removes it from all quality levels.
groupNamegroupNameUnity 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_EDITORusing 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
Additional Resources: TextureMipmapLimitGroups.HasGroup, TextureMipmapLimitGroups.CreateGroup.