Best way (talking about performance) to build a menu. OnGUI or 3D with ortographic camera.

Hey everyone. Just a performance doubt here. I heard a lot about the bad performance of the OnGUI class in Unity so I though about making my menu with planes filled with textures and use OnMouseUp… etc, functions.

As my game is for mobile, I though it will also be better because I can’t change the size of a font in OnGUI dinamically, but I can change the local scale of a 3D Text, what will make almost the same effect.

Just focusing on performance, which one is better?

Thanks from now!

So do not, under any circumstances, use OnGUI for mobile in game display - the performance is absolutely awful. I have specific advice from Unity that it should not be used due to the number of draw calls, the multiple calls per frame and the need to fully redraw the view if you use it. I am currently going through the process of a rewrite of the few bits of OnGUI I had and using NGUI instead and it has made a big difference.

However, if you are just drawing a menu that doesn’t appear over live game play it will work. One of the big problems is the way that Unity optimises frame rate over UI events that means that if the rate drops (with the standard Xcode project for instance) then the buttons don’t always work because input events are missed.