Exemplo n.º 1
0
		////////////////////////////////////////
		///////////GUI AND EDITOR STUFF/////////
		////////////////////////////////////////
		#if UNITY_EDITOR

		protected override UnityEditor.GenericMenu OnContextMenu(UnityEditor.GenericMenu menu){

			menu.AddItem( new GUIContent("Breakpoint"), isBreakpoint, ()=> { isBreakpoint = !isBreakpoint; } );
			menu.AddItem (new GUIContent ("Convert to SubTree"), false, ()=> { MakeNestedSubTree(this); });
            if (outConnections.Count > 0){
				menu.AddItem (new GUIContent ("Delete Branch"), false, ()=> { DeleteBranch(this); } );
				menu.AddItem(new GUIContent("Duplicate Branch"), false, ()=> { DuplicateBranch(this, graph); });
			}
			return menu;
		}		
Exemplo n.º 2
0
 ////////////////////////////////////////
 ///////////GUI AND EDITOR STUFF/////////
 ////////////////////////////////////////
 protected override UnityEditor.GenericMenu OnContextMenu(UnityEditor.GenericMenu menu)
 {
     menu.AddItem( new GUIContent("Breakpoint"), isBreakpoint, ()=> { isBreakpoint = !isBreakpoint; } );
     menu.AddItem (new GUIContent ("Convert to SubTree"), false, ()=> { MakeNestedSubTree(this); });
     if (outConnections.Count > 0){
         menu.AddItem (new GUIContent ("Delete Branch"), false, ()=> { DeleteBranch(this); } );
         menu.AddItem(new GUIContent("Duplicate Branch"), false, ()=> { DuplicateBranch(this, graph); });
     }
     menu = EditorUtils.GetTypeSelectionMenu(typeof(BTComposite), (t)=>{ ReplaceWith(t); }, menu, "Replace");
     return menu;
 }