Hello,
I am displaying 2d graphics like background images, menu selection buttons, back button ...etc
Each time I use a method trying the easiest and less development but prefer to know the better way for performance..
For example I have a background to display, I could do:
- Create guitexture in heirarchy, drag and drop a texture in inspector.
(I have a variable of type guitexture in my script, so that I can set the pixelInset
values from inside the script).
- Create a variable of type Texture2D , drag the texture to its corresponding variable in the inspector and display by callign GUI.Drawtexture in function OnGUI().
Which one is better (CPU,Memory) or any other benefit one over the other?
↧