I have a scene where I am spawning multiple Enemy prefabs by pulling them from an object pool and doing a SetActive(true) to enable them. In each Enemy FixedUpdate they are performing a movement function that adds an Impulse force towards the direction of the player (using timeline.rigidbody2d). When the player dies I am setting my global main clock to a slowed speed which seems to change the values of the Rigidbody, specifically the Linear/Angular drags. Then, if the player presses a button I reset the level (set the global time back to 1f, call Timeline.Reset() for all enemies, and set all enemies to SetActive(false)).
The issue I am having is that it seems like the enemies are storing their drag values during the SetActive(false) call and not resetting them to the default values. So, when they spawn again they are moving extremely fast now that the drags are lowered and the time is back to normal. Is there something I'm missing that I need to call during a reset?
I'm wondering, maybe the rigidbody values are set on the next FixedUpdate() call which isn't happening with a time scale of 1f before I call SetActive(false)?
Customer support service by UserEcho