|
Post by milliemag on Aug 21, 2017 4:21:57 GMT
I'm not certain why I'm having the issue, but I have prefabs of explosions and flame effect animations set to play in certain parts of my game. But it seems like they only play in full half of the time. They are being spawned and despawned through Pool Boss. But sometimes they play completely, other times only half the animation plays, and sometimes it doesn't play at all, even though they are set to despawn way before the next prefab of that type is supposed to spawn through Pool Boss. Any ideas why? If it helps, I'm using Playmaker to call spawn and despawn functions.
-MillieMag
|
|
|
Post by DarkTonic Dev on Aug 21, 2017 6:06:52 GMT
Unless you have code in Awake or Start methods that is playing or stopping animations, I have no idea and would think it's unrelated to using Pool Boss.
As the readme says, any state initialization code must be moved to OnStart which fires every time something is spawned. Awake and Start only fire on the first spawn and not when respawned.
This is how all pooling plugins work.
|
|
|
Post by milliemag on Aug 22, 2017 4:55:32 GMT
I see. Thanks for clarifying. So, I essentially have to figure out the best way to reset the animation before deactivation or upon respawn, correct?
|
|
|
Post by DarkTonic Dev on Aug 22, 2017 5:05:48 GMT
If it has anything to do with Pool Boss, then yes. Which I am not convinced of yet. You would need to do some debugging and looking at Mechanim (if you are using it) when despawning / respawning the same thing to see why it doesn't work right.
|
|
|
Post by milliemag on Aug 22, 2017 15:51:06 GMT
Ok. That makes more sense to me too. Will do. Thanks!
|
|
|
Post by DarkTonic Dev on Aug 22, 2017 20:56:53 GMT
No problem.
|
|