Is there any way to use a texture from a spritesheet for GUITextures? I'm just trying to avoid extra drawcalls caused by GUITextures.
Asked
Active
Viewed 1,354 times
0
-
If you worry about DrawCalls, Unitys current GUI will not satisfy you, even with workarounds like this. – kat0r Jun 27 '14 at 16:45
-
I'm developing for mobile platforms. Currently I have one drawcall thanks to my spritesheet(which also includes my HUD buttons that I cannot use). And I don't know how many drawcalls will make trouble. – Namely Jun 27 '14 at 16:50
-
@user1919764 You'll want to use something like NGUI http://www.tasharen.com/?page_id=140 -- otherwise wait for Unity 4.6 to come out later this year. Right now, Unity's built-in GUI methods are not draw-call friendly. 1 GUITexture = 1 draw call, no matter the sprite. – Chris McFarland Jun 29 '14 at 01:39
-
Thanks. I think there is a proper way. If we add GUITexture to the scene without texture(it still keeps functionality) and add sprite to the scene with same poisition, we can keep draw calls same. Actually, I tried this method and it works. Only problem is if you change camera size at runtime, naturally, sprites position on the screen changes. – Namely Jun 29 '14 at 08:58