Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
CloseFor some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.
CloseThis property causes a texture to ignore all texture mipmap limit settings.
When this property is true
, Unity always uploads the texture to the GPU at full resolution, disregarding the active quality setting's global texture mipmap limit and texture mipmap limit group settings, even if this texture has a texture mipmap limit group set.
When this property is false
, the texture respects the active quality setting's global texture mipmap limit, unless the texture is part of a mipmapLimitGroup.
When changing this property at runtime: if this causes the actual mipmap limit for this texture to change, then the texture will be reuploaded to the GPU.
For an optimal workflow, set this property in the constructor or in the texture importer to immediately upload the texture with the currently active mipmap limits properly applied or ignored.
If the texture has no mipmaps, this property has no effect. Note that this can only be toggled at runtime if the Texture is readable.
This code example demonstrates how to set this property to true
in both the Texture2D constructor and AssetPostprocessor.
using UnityEngine; using UnityEngine.Experimental.Rendering; #if UNITY_EDITOR using UnityEditor; #endif
public class ExampleScript : MonoBehaviour { void Start() { const int size = 32; Texture2D scriptTexture = new Texture2D(size, size, GraphicsFormat.R8G8B8A8_SRGB, Texture.GenerateAllMips, "MyGroup", TextureCreationFlags.MipChain | TextureCreationFlags.IgnoreMipmapLimit); Debug.Log($"ignoreMipmapLimit has been set to '{scriptTexture.ignoreMipmapLimit}' on the script texture!"); } }
#if UNITY_EDITOR public class ExampleImporter : AssetPostprocessor { void OnPreprocessTexture() { if (assetPath.Contains("_IgnoreMipmapLimit")) { TextureImporter textureImporter = (TextureImporter)assetImporter; textureImporter.ignoreMipmapLimit = true; } } } #endif
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.