- Home /
Disabling mipmapping for a texture generated in code during run-time.
I'm generating several small textures (Texture2D) during run-time. They are very small at only 32x32 pixels, but for that reason they need to be crisp. Changing the filter mode to Point was simple and while running in the Unity editor they appear very sharp. In a browser however they are strongly mipmapped and blurry. I've already tried changing Texture.mipMapBias with no luck.
What I really need but can't find is a way to disable mipmapping for these texture.
The closest thing I've found is TextureImporter.mipmapEnabled, but this seems to be an editor function and I don't know how to apply it, if it is possible.
My other thought was changing something in quality settings, but I haven't found anything in there either.
I'll appreciate any help, thanks!
Answer by Bunny83 · Aug 18, 2012 at 02:56 AM
When you create your Texture set the mipmap parameter to false.
http://docs.unity3d.com/Documentation/ScriptReference/Texture2D.Texture2D.html
New link:
http://docs.unity3d.com/ScriptReference/Texture2D-ctor.html
Unity 4.6 has not the mipmap parameter, do you know how to do the same in this version?
As far as i know nothing has changed in 4.6. However it looks like the documentation link has changed. I'll edit my answer above.
Your answer
![](https://koobas.hobune.stream/wayback/20220613075828im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Setting mipmaps 0 Answers
Is there a way to cap the max mipmap level of a generated texture? 1 Answer
Get set of Pixels from PolygonCollider2d Position 0 Answers
Long looping animated backgrounds in a 2D game. 1 Answer
Why can't I use Texture2D? 1 Answer