public static HelpInfo FromSelection(ObjectSelection sel) { if (sel == null || sel.GameObjectCount != 1) { return(null); } return(FromGameObject(sel.GameObjects.First())); // ToDo: Probably improve later }
public SelectionChangedEventArgs(ObjectSelection current, ObjectSelection previous, ObjectSelection.Category changedCategoryFallback) { this.current = current; this.previous = previous; this.diffCat = ObjectSelection.GetAffectedCategories(this.previous, this.current); if (this.diffCat == ObjectSelection.Category.None) { this.diffCat = changedCategoryFallback; } this.added = this.current - this.previous; this.removed = this.previous - this.current; }
public ObjectPropertyChangedEventArgs(ObjectSelection obj, IEnumerable <PropertyInfo> infos, bool persistenceCritical = true) { if (infos == null) { infos = new PropertyInfo[0]; } this.obj = obj; this.propInfos = infos.ToList(); this.propNames = this.propInfos.Select(i => i.Name).ToList(); this.completeChange = this.propInfos.Count == 0; this.persistCritical = persistenceCritical; }
public PrefabAppliedEventArgs(ObjectSelection obj) : base(obj.HierarchyExpand(), new PropertyInfo[0]) { }
public ObjectPropertyChangedEventArgs(ObjectSelection obj, bool persistenceCritical = true) : this(obj, null, persistenceCritical) { }