Pooling different kind of abilities that can change in runtime.
Hi,
I have a ability system that work with scriptable objects. I have a scriptable object for each possible spell for my player (containing all the datas + a prefab attached) the prefab attached is the one to instantiate when I shoot.
I have a generic monobehaviour that just read the datas from the scriptable object and instantiate the prefab. But I want to pool all these for performance.
What should I do ? If I create a pool manager that can hold an array of pool this not good because the player will always have only two abilities to use at the same time. So every time the player change his abilities I have to recreate my pools. I don't know which direction I should take.
It's a kind of Rpg-action game so the player is able to change his abilities on the fly.
Somebody faced the same problem ?
Thanks in advance.
Lionel