Is there a proper, one-function way to leave a game while it's still going on? I'm having difficulty finding it in the docs. I'm guessing it might be something like StopClient() or StopHost(), but then you need to differentiate between them and it seems messy. There must be a simple function to leave a game regardless of client/host and act appropriately for it.
Ah yes, I'm being lazy at the moment and calling all of them (StopClient, StopServer & StopHost) when I quit so I don't have to differentiate. It doesn't cause any problems that way, but I suppose we could just pass through a new method which checks the status of isServer and isClient and only calls the appropriate stop methods. Code (CSharp): public void QuitGame () { if (isClient && isServer) StopHost(); else if (isClient) StopClient(); else StopServer(); }