public RSRuleData(bool inbAssignId) { DefaultInitialize(); if (inbAssignId) { Id = ScriptUtils.NewId(); } }
public RSRuleData Clone() { RSRuleData clone = new RSRuleData(); clone.Id = ScriptUtils.NewId(); clone.Name = Name; clone.RoutineGroup = RoutineGroup; clone.Enabled = Enabled; clone.OnlyOnce = OnlyOnce; clone.TriggerId = TriggerId; clone.Conditions = CloneUtils.DeepClone(Conditions); clone.ConditionSubset = ConditionSubset; clone.Actions = CloneUtils.DeepClone(Actions); return(clone); }
static private bool CleanUp(RSRuleData ioRule, HashSet <string> ioDiscoveredRules) { bool bChanged = false; if (string.IsNullOrEmpty(ioRule.Id)) { ioRule.Id = ScriptUtils.NewId(); bChanged = true; } while (!ioDiscoveredRules.Add(ioRule.Id)) { UnityEngine.Debug.LogErrorFormat("[TableUtils] Overlapping rule id {0}", ioRule.Id); ioRule.Id = ScriptUtils.NewId(); bChanged = true; } return(bChanged); }