internal static void OpenAnotherWindow() { RemoteGame instance = ScriptableObject.CreateInstance <RemoteGame>(); foreach (ContainerWindow window in ContainerWindow.windows) { foreach (View allChild in window.mainView.allChildren) { DockArea dockArea = allChild as DockArea; if (!((UnityEngine.Object)dockArea == (UnityEngine.Object)null) && dockArea.m_Panes.Any <EditorWindow>((Func <EditorWindow, bool>)(pane => pane.GetType() == typeof(RemoteGame)))) { dockArea.AddTab((EditorWindow)instance); break; } } } instance.Show(); if (!EditorApplication.isPlaying) { return; } instance.id = ScriptableSingleton <NScreenManager> .instance.GetNewId(); instance.StartGame(); }
internal static void OpenAnotherWindow() { RemoteGame remoteGame = ScriptableObject.CreateInstance <RemoteGame>(); ContainerWindow[] windows = ContainerWindow.windows; for (int i = 0; i < windows.Length; i++) { ContainerWindow containerWindow = windows[i]; View[] allChildren = containerWindow.mainView.allChildren; for (int j = 0; j < allChildren.Length; j++) { View view = allChildren[j]; DockArea dockArea = view as DockArea; if (!(dockArea == null)) { if (dockArea.m_Panes.Any((EditorWindow pane) => pane.GetType() == typeof(RemoteGame))) { dockArea.AddTab(remoteGame); break; } } } } remoteGame.Show(); if (EditorApplication.isPlaying) { remoteGame.id = ScriptableSingleton <NScreenManager> .instance.GetNewId(); remoteGame.StartGame(); } }
internal static void Init() { RemoteGame remoteGame = (RemoteGame)EditorWindow.GetWindow(typeof(RemoteGame)); if (EditorApplication.isPlaying && !remoteGame.IsRunning()) { remoteGame.id = ScriptableSingleton <NScreenManager> .instance.GetNewId(); remoteGame.StartGame(); } }
internal static void Init() { RemoteGame window = (RemoteGame)EditorWindow.GetWindow(typeof(RemoteGame)); if (!EditorApplication.isPlaying || window.IsRunning()) { return; } window.id = ScriptableSingleton <NScreenManager> .instance.GetNewId(); window.StartGame(); }
internal static void StartAll() { ScriptableSingleton <NScreenManager> .instance.ResetIds(); RemoteGame[] array = Resources.FindObjectsOfTypeAll <RemoteGame>(); for (int i = 0; i < array.Length; i++) { RemoteGame remoteGame = array[i]; remoteGame.id = ScriptableSingleton <NScreenManager> .instance.GetNewId(); remoteGame.StartGame(); } }