Uninomicon

Documenting the dark corners of the Unity Engine.

User Tools

Site Tools


texture2d

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
texture2d [2021/12/11 20:11]
guycalledfrank
texture2d [2022/01/28 17:22] (current)
73.217.35.3
Line 1: Line 1:
 ====== Texture2D ====== ====== Texture2D ======
 +
 +===== Undocumented Constructor =====
  
 Texture2D has an undocumented constructor with an integer mipmap count, instead of just a bool for the whole mipchain, that is: Texture2D has an undocumented constructor with an integer mipmap count, instead of just a bool for the whole mipchain, that is:
Line 6: Line 8:
  
 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. 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.+ 
 +According to [[https://github.com/Unity-Technologies/UnityCsReference|UnityCsReference]], the constructor first appeared in [[https://github.com/Unity-Technologies/UnityCsReference/blob/2019.2/Runtime/Export/Graphics/Texture.cs#L541|2019.2]] and is not available in [[https://github.com/Unity-Technologies/UnityCsReference/blob/2019.1/Runtime/Export/Graphics/Texture.cs|2019.1]], [[https://github.com/Unity-Technologies/UnityCsReference/blob/2018.4/Runtime/Export/Texture.cs|2018.4]] or any of the earlier versions.
texture2d.1639253495.txt.gz · Last modified: 2021/12/11 20:11 by guycalledfrank