So i recently started optimizing my game by reducing the number of Garbage Collector calls and I noticed, that some calls to UI elements will trigger a GC call.
As can be seen in the attached picture that every time I set the fill amount of an UI image, the GC allocs 20 B. I don’t know if it intended or it is a bug, but if I have many UI elements and manipulate their properties over time I will get a huge amount of GC calls.
The only solution I can find to this is to move my code to a coroutine which updates on a smaller interval. Do you Unity masters have any other solution to this problem?