Uninomicon

Documenting the dark corners of the Unity Engine.

User Tools

Site Tools


texture2d

This is an old revision of the document!


Texture2D

Texture2D has an undocumented constructor with an integer mipmap count, instead of just a bool for the whole mipchain, that is:

new Texture2D(int width, int height, TextureFormat format, int numMips, bool isLinear)

This way it is possible to create textures with a limited number of mipmaps, and it can be useful for large atlases to prevent leaking. It is unclear in which version this constructor first appeared, but it doesn't work on 5.6, but definitely does on > 2019.3.

texture2d.1639253495.txt.gz · Last modified: 2021/12/11 20:11 by guycalledfrank