Shutting Down Cleanly

Would it be acceptable to use in the HostGameManager class and the Dispose method:
HostSingleton.Instance.StopAllCoroutines();
Rather than stopping the single coroutine by name? I’m wondering for shutting down if that might just be the best in case you might come back and add another coroutine. Or might there be some disadvantage to stopping them all when you only have one going? I’m lazy and it’s easier to stop all then to list out the single coroutine. Just making sure there’s no disadvantages here.

Thanks!

Julian

Hi there,
It’s always better practice to specify the coroutine that you are forcing to end. I don’t think we add any other coroutines to this class, so you are probably safe to just StopAllCoroutines.

1 Like

Privacy & Terms