Hello guys.
I’ve been working on a HUD element for my game and noticed that accessing the ‘fillAmount’ field of an image causes 20 Bytes of memory to be allocated every time I change it.
I wonder if there is something that can be done about this. It this simply a bug/an oversight or is this inevitable due to how the UI system works internally? I mean, I cannot see what happens behind the scenes, but generating garbage every time a float is being changed is a bit of a problem since I use that particular feature on multiple GameObjects simultaneously.
Again, there might be a good explanation for this, but I cannot know it.