Scenario:
My enemies are being driven by an AI coroutine. When the enemy is outside the player’s ‘active radius’, its parent gameObject is set to active = false. This stops the coroutine.
Problem:
I’d like to instead pause the coroutine, so that when the enemy is back inside the player’s ‘active radius’ again, the coroutine continues execution and the enemy continues doing whatever it was doing outside of the radius.
I could probably be overthinking it and there may be a simple solution.
If anyone would be kind enough to offer some advice, it would be much appreciated. Thankyou!