Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

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.