Implement Unity GameObject pooling
KurtGokhan opened this issue · 2 comments
KurtGokhan commented
When creating new elements, many new GameObjects will be created on Unity side. This is a problem especially since some components drop the framerate on initialization (like TextMeshPRO). Such components (or ideally all components) should be pooled and recycled.
This was requested in Discord. Here is a simple example of how to implement it.
KurtGokhan commented
Done in main branch. Will be released in next version.
KurtGokhan commented
Added pool property to all elements, accepting either boolean or string. This will group similar elements in a pool and recycle elements from that pool instead of creating/destroying them each time. This is enabled by default for text elements. Will observe how it works and may improve it in the next versions.