- Home /
Texture and Texture2D for GUI (simple question)
Is the Texture2D heavier than Texture in terms of memory and/or processing?
Answer by Statement · Mar 24, 2011 at 06:00 PM
No, Texture is just a base class. I don't think you can use a texture directly. What is your choice?
Base class for texture handling. Contains functionality that is common to both Texture2D and RenderTexture classes.
- See also Cubemap and MovieTexture, which also inherit from Texture.
I used GUI.DrawTexture(Rect, Texture), worked fine without specifying it as Texture2D. I made an public Texture and applyied manually on the gameobject's script before compiling. Thank you for the info.
Yeah, you can plug 2d textures in there since it's a subclass of texture. all subclasses should be pluggable.
Danilo meant that you can use Texture rather than Texture2D. You can use the base class directly as long as you don't need the extra features of Texture2D.