public static void ClassCleanup() { NitroxServiceLocator.EndCurrentLifetimeScope(); if (Directory.Exists(tempSaveFilePath)) { Directory.Delete(tempSaveFilePath, true); } }
public void StopCurrentSession() { SceneManager.sceneLoaded -= SceneManager_sceneLoaded; multiplayerSession.Disconnect(); OnAfterMultiplayerEnd?.Invoke(); //Always do this last. NitroxServiceLocator.EndCurrentLifetimeScope(); }
public void StopCurrentSession() { SceneManager.sceneLoaded -= SceneManager_sceneLoaded; if (multiplayerSession.CurrentState.CurrentStage != MultiplayerSessionConnectionStage.DISCONNECTED) { multiplayerSession.Disconnect(); } OnAfterMultiplayerEnd?.Invoke(); //Always do this last. NitroxServiceLocator.EndCurrentLifetimeScope(); }
public void Cleanup() { NitroxServiceLocator.EndCurrentLifetimeScope(); }