/// <summary> /// Construct new ReViewFeedObject with given parent (can be null if type is track), name, time when created and type. /// If type is track no log output can be added for it. /// Throws InvalidOperationException if parent is null and type is item / generic item. /// </summary> /// <param name="parent">Parent object, if type is item / generic item then parent is the containing track. If track then parent is the parent track or null if this is the root.</param> /// <param name="debugName">Name for this debug object, will be track or item / generic item name.</param> /// <param name="time">Time when this debug object starts.</param> /// <param name="type">Either track or item / generic item, only items can contain log output.</param> public ReViewFeedObject(ReViewFeedObject parent, string debugName, int time, EDebugType type) { this.parent = parent; if (type == EDebugType.Item) { if (parent == null) { throw new InvalidOperationException("Cannot have null parent for item type."); } debugID = ReViewFeedManager.Instance.AddItem(parent.DebugID, time, debugName); } else if (type == EDebugType.GenericItem) { if (parent == null) { throw new InvalidOperationException("Cannot have null parent for item type."); } debugID = ReViewFeedManager.Instance.AddGenericItem(parent.DebugID, time, debugName); } else if (type == EDebugType.Track) { debugID = ReViewFeedManager.Instance.AddTrack(parent == null ? -1 : parent.DebugID, debugName); } else { throw new InvalidOperationException("Invalid type!"); } }
public DebugObject(DebugObject inParentDebugObject, string inDebugName, EDebugType inType) : base(inParentDebugObject, inDebugName, GameUpdateManager.Instance.Now, inType) { }
public ReViewDebugObject(ReViewDebugObject inParentDebugObject, string inDebugName, EDebugType inType) : base(inParentDebugObject, inDebugName, ReViewManager.Now, inType) { }