Inheritance: EditorWindow, IHasCustomMenu
Ejemplo n.º 1
0
        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();
            }
        }
Ejemplo n.º 2
0
        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();
        }
Ejemplo n.º 3
0
 internal static void StopAll()
 {
     RemoteGame[] array = Resources.FindObjectsOfTypeAll <RemoteGame>();
     for (int i = 0; i < array.Length; i++)
     {
         RemoteGame remoteGame = array[i];
         remoteGame.StopGame();
     }
 }
Ejemplo n.º 4
0
 internal static void RepaintAllGameViews()
 {
     RemoteGame[] array = Resources.FindObjectsOfTypeAll <RemoteGame>();
     for (int i = 0; i < array.Length; i++)
     {
         RemoteGame remoteGame = array[i];
         remoteGame.Repaint();
         remoteGame.GameViewAspectWasChanged();
     }
 }
Ejemplo n.º 5
0
        internal static void Init()
        {
            RemoteGame remoteGame = (RemoteGame)EditorWindow.GetWindow(typeof(RemoteGame));

            if (EditorApplication.isPlaying && !remoteGame.IsRunning())
            {
                remoteGame.id = ScriptableSingleton <NScreenManager> .instance.GetNewId();

                remoteGame.StartGame();
            }
        }
Ejemplo n.º 6
0
        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();
        }
Ejemplo n.º 7
0
        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();
            }
        }
Ejemplo n.º 8
0
        internal static void OpenAnotherWindow()
        {
            RemoteGame game = ScriptableObject.CreateInstance <RemoteGame>();

            foreach (ContainerWindow window in ContainerWindow.windows)
            {
                foreach (View view in window.mainView.allChildren)
                {
                    DockArea area = view as DockArea;
                    if (area != null)
                    {
                        if (< > f__am$cache3 == null)
                        {