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

Lots of Allocations in CanvasRenderer

Discussion in 'UGUI & TextMesh Pro' started by hanger, Oct 30, 2014.

  1. hanger

    hanger

    Joined:
    May 28, 2014
    Posts:
    4
    We've noticed a lot of allocations in CanvasRenderer related to delegate adding and removal whenever activate or deactivate game objects. For instance, an extremely simple gameobject with two Text components allocates 8.9kb when activating and deactivating on a canvas that has a lot of controls. Most of these allocations seem to come from combining delegates (event += and -=) and GetComponent() calls.

    Are there any plans to clean this up? We're seeing GC spikes because of these allocations.
     

    Attached Files:

    Last edited: Nov 5, 2014