void LeavePlayingState()
    {
        //Game.game.clientFrontend.Clear();

        PrefabAssetManager.DestroyEntity(m_GameWorld.EntityManager, m_LocalPlayer);
        m_LocalPlayer = Entity.Null;

        m_clientWorld.Shutdown();
        m_clientWorld = null;

        // TODO (petera) replace this with a stack of levels or similar thing. For now we just load the menu no matter what
        //Game.game.levelManager.UnloadLevel();
        //Game.game.levelManager.LoadLevel("level_menu");

        PrefabAssetManager.Shutdown();
#pragma warning disable 618
        // we're keeping World.Active until we can properly remove them all
        // FIXME: not compatible with dots netcode
        m_GameWorld = World.Active;
        World.Active.CreateSystem <GameTimeSystem>();
#pragma warning restore 618

        //Game.game.clientFrontend.ShowMenu(ClientFrontend.MenuShowing.None);

        //Game.game.levelManager.LoadLevel("level_menu");

        GameDebug.Log("Left playingstate");
    }
    public void Shutdown()
    {
        GameDebug.Log("ClientGameLoop shutdown");
        Console.RemoveCommandsWithTag(this.GetHashCode());

        m_StateMachine.Shutdown();

        m_NetworkClient.Shutdown();

        PrefabAssetManager.Shutdown();
        m_Transport.Shutdown();
    }