Is it more efficient to use OnGui inventory system?

I was using GameObjects as inventory slots in my multiplayer game, but i saw a tutorial that used GUI elements to create the inventory. Should i continue using GameObjects or are GUI elements a more efficient way?

OnGui is the old way of doing things. Better to stick with the newer way.

2 Likes

GUI elements are better for performance and flexibility.

OnGUI should only be used for editor extensions and the like.