Shortcut to question: How do you properly pool objects which have FSM's and other settings which need to reboot when they spawn?
In my project I have targets that are to be shot. As they detect collision with the projectile they disable the starting mesh renderer and enable broken parts which burst out. The FSM in the target objects also add to int values for score and telling the game to replace them, etc.
I set this up just plain creating the target objects using a prefab, but I noticed a little bit of hitching when the replacement items were spawning. So I pooled the targets and spawned them like that.
The problem is that the items are now spawning in their already broken state. They are saving all alterations, such as the starting mesh renderer disabled and the broken parts already enabled (and already blasted out with their add force actions).
Is there a way to renew the pooled objects when they are returned to the pool? Come to think of it, that sounds like it defeats the purpose of pooling them because it means you are in fact loading again...