Search Unity

Unity UI Memory allocation on UI Image

Discussion in 'UGUI & TextMesh Pro' started by joaobsneto, Apr 26, 2019.

  1. joaobsneto

    joaobsneto

    Joined:
    Dec 10, 2009
    Posts:
    152
    I'm doing a performance check in my project and I want to understand and mitigate the allocation that the game is making. I found that whenever I change a sprite from UI Image component it makes a SendWillRendererCanvases, and the change in Sprite result in a change in Material that allocates memory. Is this necessary? Is there a way to avoid it?
    guiPerformance.png
     
  2. joaobsneto

    joaobsneto

    Joined:
    Dec 10, 2009
    Posts:
    152
    I found that in the build this does not occur, maybe it's a problem in profiler or how Unity UI works in the editor.