public override void Submit()
 {
     if (objects.Count > 0)
     {
         CommandManager.AddCommand(this);
     }
 }
        public override void Submit()
        {
            ParametersController controller = gObject.GetComponent <ParametersController>();

            if (null != controller && !controller.IsDeletable())
            {
                return;
            }

            ToolsUIManager.Instance.SpawnDeleteInstanceVFX(gObject);

            CommandGroup      constraintGroup = null;
            List <Constraint> constraints     = ConstraintManager.GetObjectConstraints(gObject);

            if (constraints.Count > 0)
            {
                constraintGroup = new CommandGroup("Constraints");
                foreach (Constraint constraint in constraints)
                {
                    new CommandRemoveConstraint(constraint.constraintType, constraint.gobject).Submit();
                }
            }

            Redo();
            CommandManager.AddCommand(this);

            if (null != constraintGroup)
            {
                constraintGroup.Submit();
            }
        }
Exemple #3
0
 public override void Submit()
 {
     CommandManager.EndGroup();
     if (commands.Count > 0)
     {
         CommandManager.AddCommand(this);
     }
 }
Exemple #4
0
 public override void Submit()
 {
     if (null != objects && objects.Count > 0)
     {
         Redo();
         CommandManager.AddCommand(this);
     }
 }
Exemple #5
0
 public override void Submit()
 {
     if (null == constraint || null == constraint.target)
     {
         return;
     }
     CommandManager.AddCommand(this);
     Redo();
 }
Exemple #6
0
        public override void Submit()
        {
            foreach (var selectedItem in Selection.SelectedObjects)
            {
                GameObject gObject   = objectPath.Length > 0 ? selectedItem.transform.Find(objectPath).gameObject : selectedItem;
                Component  component = gObject.GetComponent(componentName);
                if (null == component)
                {
                    continue;
                }

                newValue = GetValue(component, fieldName);
                break;
            }

            CommandManager.AddCommand(this);
        }
Exemple #7
0
 public override void Submit()
 {
     newObject = SceneManager.AddObject(gObject);
     parent    = SceneManager.GetObjectParent(newObject).transform;
     CommandManager.AddCommand(this);
 }
 public override void Submit()
 {
     Redo();
     CommandManager.AddCommand(this);
 }