Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

Legacy GUI vs "Canvas" GUI performance

Discussion in 'Unity UI & TextMesh Pro' started by chubbspet, Dec 8, 2018.

  1. chubbspet


    Feb 18, 2010
    Hey guys

    Due to some old, long-term projects that was done in legacy gui (and working really well) I stuck to legacy GUI until now that I have 2 new contracts. The gui stuff I do is mostly pretty basic. I can't seem to find any google links comparing the performance of the 2. If someone could please help me with a link or explain (from a performance point of view) if/why the new system is better that the legacy one. It would be appreciated.

    Thanks for any input.
  2. Hosnkobf


    Aug 23, 2016
    As you can read here the OnGUI Method is potentially called several times per frame. How often is depending on the types of events which happen at the given frame. Here is a list of potential events.
    If you have a complex UI this can drastically decrease your performance. For simple UIs it can be okay.

    I wonder how the performance difference is if you just display three buttons... maybe you can figure it out with the profiler.
  3. Digi001


    May 29, 2015
    Thanks, I will run some tests and post them here for what it's worth. Maybe it can help someone, although my knowledge is very limited regarding UI.