Exemplo n.º 1
0
        void AddCondition(ConditionTask condition)
        {
            if (condition is ConditionList)
            {
                Debug.LogWarning("Adding a ConditionList within another ConditionList is not allowed for clarity");
                return;
            }

                        #if UNITY_EDITOR
            if (!Application.isPlaying)
            {
                Undo.RecordObject(ownerSystem.contextObject, "List Add Task");
                currentViewCondition = condition;
            }
                        #endif

            conditions.Add(condition);
            condition.SetOwnerSystem(this.ownerSystem);
        }
Exemplo n.º 2
0
        public void AddCondition(ConditionTask condition)
        {
            if (condition is ConditionList)
            {
                foreach (var subCondition in (condition as ConditionList).conditions)
                {
                    AddCondition(subCondition);
                }
                return;
            }

#if UNITY_EDITOR
            UndoUtility.RecordObject(ownerSystem.contextObject, "List Add Task");
            currentViewCondition = condition;
#endif

            conditions.Add(condition);
            condition.SetOwnerSystem(this.ownerSystem);
        }