Beispiel #1
0
    private static void Application_PlaymodeStateChanged()
    {
        if (EditorApplication.isPlaying || EditorApplication.isPaused)
        {
            AddAllContextsWithDefaults();
            for (int n = 0; n < allContexts.Count; n++)
            {
                allContexts[n].GameObjectSetting.StoreAllSelectedSettings();
            }
            if (PPEditorWindow.currentWindow != null)
            {
                currentWindow.Repaint();
            }
        }
        else
        {
            for (int n = 0; n < allContexts.Count; n++)
            {
                allContexts[n].GameObjectSetting.RestoreAllSelectedSettings();
            }

            allContexts.Clear();
            if (PPEditorWindow.currentWindow != null)
            {
                currentWindow.Repaint();
            }
        }
    }