I finally use GUI components in iPhone

I read a post that the OnGUI immediate mode GUI system uses more drawcalls. Then I took a try on GUIManager, however, it doesn’t work very well, my game become a little lag. I have no idea about the performance of GUIManager, it seems that there may raycast, ArrayList like calculated amount in the source.

Finally, I rolled back my code to the GUI Component version.

My Game: Fight Desert
iTunes Link: http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=331009606&mt=8

Well, I’d rather use GUI Texture to replace those buttons, in next update.

199442--7336--$fightdesert03iphone_122.png

Hello, have you checked the Sprite manager for the iPhone?

It envelopes all the draw calls of your textures into 1, that could help you out :slight_smile:

Check it on the wiki :smile:

I had took a glance at Sprit Manager.
But I don’t know how to add Mouse/Touch events to the sprit object. Just use Physics.Raycast to check the transform of sprit?

Yes, SpriteManager doesn’t have any touch detection, so you’ll have to add a collider and do a raycast. But unless you need sprite animation features, you don’t need to use SpriteManager to save draw calls now that 1.5 has automatic batching.