So I have MonoBehaviour object which is manager, there are many dynamic objects which need to be called every frame (Update). Those objects are pooled and when they are in pool they are not part of the Update calls.
So my manager has an event field "internal event Action OnUpdate;"
Every object that needs update subscribes to the event and unsubscribes upon being returned to the pool.
Of course every Update I call "OnUpdate?.Invoke();"
My question is do I need to worry if its about 100-200 objects? Is there more performant way to do this?
ChatGPT is saying that calling += and -= creates lots of garbage if called often and that I should change it to the List<Action> which doesnt seem right.