Hopefully, we now have an understanding of what we need from our Pooling System, so all that's left is to implement it. The requirements are as follows:
- It must accept requests to spawn a GameObject from a Prefab, an initial position, and an initial rotation:
- If a despawned version already exists, it should respawn the first available one
- If it does not exist, then it should instantiate a new GameObject from the Prefab
- In either case, the Spawned() method should be invoked on all IPoolableComponent Interface Classes attached to the GameObject
- It must accept requests to despawn a specific GameObject:
- If the object is managed by the Pooling System, it should deactivate it and call the Despawned() method on all ...