Ejemplo n.º 1
0
 /// <summary>
 /// Displays all MergeActions and the "apply merge" button if a merge is in progress.
 /// </summary>
 private void DisplayMergeProcess()
 {
     if (mergeInProgress)
     {
         var done = DisplayMergeActions();
         GUILayout.BeginHorizontal();
         if (done && GUILayout.Button("Apply merge"))
         {
             manager.CompleteMerge();
             manager = null;
         }
         GUILayout.EndHorizontal();
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Tab that offers scene merging.
        /// </summary>
        private void OnGUISceneTab()
        {
            GUILayout.Label("Open Scene: " + SceneManager.GetActiveScene().path);
            if (SceneManager.GetActiveScene().path != "" &&
                !mergeInProgress &&
                GUILayout.Button("Start merging this scene", GUILayout.Height(80)))
            {
                var mm = new MergeManagerScene(this, vcs);
                if (mm.InitializeMerge())
                {
                    manager = mm;
                }
            }

            DisplayMergeProcess();
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Tab that offers scene merging.
        /// </summary>
        private void OnGUISceneTab()
        {
            GUILayout.Label("Open Scene: " + EditorApplication.currentScene);
            if (EditorApplication.currentScene != "" &&
                !mergeInProgress &&
                GUILayout.Button("Start merging this scene", GUILayout.Height(80)))
            {
                var mm = new MergeManagerScene(this, vcs);
                if (mm.InitializeMerge())
                {
                    manager = mm;
                }
            }

            DisplayMergeProcess();
        }
Ejemplo n.º 4
0
 /// <summary>
 /// If no merge is in progress, draws the buttons to switch between tabs.
 /// Otherwise, draws the "abort merge" button.
 /// </summary>
 private void DrawTabButtons()
 {
     if (!mergeInProgress)
     {
         string[] tabs = { "Merge Scene", "Merge Prefab", "Settings" };
         tab = GUI.SelectionGrid(new Rect(72, 36, 300, 22), tab, tabs, 3);
     }
     else
     {
         GUI.backgroundColor = new Color(1, 0.4f, 0.4f, 1);
         if (GUI.Button(new Rect(72, 36, 300, 22), "Abort merge"))
         {
             manager.AbortMerge();
             manager = null;
         }
         GUI.backgroundColor = Color.white;
     }
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Tab that offers prefab merging.
        /// </summary>
        private void OnGUIPrefabTab()
        {
            GameObject prefab;

            if (!mergeInProgress)
            {
                GUILayout.Label("Drag your prefab here to start merging:");
                if (prefab = EditorGUILayout.ObjectField(null, typeof(GameObject), false, GUILayout.Height(60)) as GameObject)
                {
                    var mm = new MergeManagerPrefab(this, vcs);
                    if (mm.InitializeMerge(prefab))
                    {
                        manager = mm;
                    }
                }
            }

            DisplayMergeProcess();
        }
Ejemplo n.º 6
0
 private void AbortMerge()
 {
     manager.AbortMerge();
     manager = null;
 }
 private void AbortMerge()
 {
     manager.AbortMerge();
     manager = null;
 }
 /// <summary>
 /// Displays all MergeActions and the "apply merge" button if a merge is in progress.
 /// </summary>
 private void DisplayMergeProcess()
 {
     if(mergeInProgress)
     {
         var done = DisplayMergeActions();
         GUILayout.BeginHorizontal();
         if(done && GUILayout.Button("Apply merge"))
         {
             manager.CompleteMerge();
             manager = null;
         }
         GUILayout.EndHorizontal();
     }
 }
 /// <summary>
 /// If no merge is in progress, draws the buttons to switch between tabs.
 /// Otherwise, draws the "abort merge" button.
 /// </summary>
 private void DrawTabButtons()
 {
     if(!mergeInProgress)
     {
         string[] tabs = { "Merge Scene", "Merge Prefab", "Settings" };
         tab = GUI.SelectionGrid(new Rect(72, 36, 300, 22), tab, tabs, 3);
     }
     else
     {
         GUI.backgroundColor = new Color(1,0.4f,0.4f,1);
         if(GUI.Button(new Rect(72, 36, 300, 22), "Abort merge"))
         {
             manager.AbortMerge();
             manager = null;
         }
         GUI.backgroundColor = Color.white;
     }
 }
        /// <summary>
        /// Tab that offers prefab merging.
        /// </summary>
        private void OnGUIPrefabTab()
        {
            GameObject prefab;
            if(!mergeInProgress)
            {
                GUILayout.Label("Drag your prefab here to start merging:");
                if(prefab = EditorGUILayout.ObjectField(null, typeof(GameObject), false, GUILayout.Height(60)) as GameObject)
                {
                    var mm = new MergeManagerPrefab(this, vcs);
                    if(mm.InitializeMerge(prefab))
                    {
                        manager = mm;
                    }
                }
            }

            DisplayMergeProcess();
        }
        /// <summary>
        /// Tab that offers scene merging.
        /// </summary>
        private void OnGUISceneTab()
        {
            GUILayout.Label("Open Scene: " + EditorApplication.currentScene);
            if(EditorApplication.currentScene != ""
               && !mergeInProgress
               && GUILayout.Button("Start merging this scene", GUILayout.Height(80)))
            {
                var mm = new MergeManagerScene(this, vcs);
                if(mm.InitializeMerge())
                {
                    manager = mm;
                }
            }

            DisplayMergeProcess();
        }
Ejemplo n.º 12
0
 private void AbortMerge(bool showNotification = true)
 {
     manager.AbortMerge(showNotification);
     manager = null;
 }