Ejemplo n.º 1
0
        public static HelpInfo FromSelection(ObjectSelection sel)
        {
            if (sel == null || sel.GameObjectCount != 1)
            {
                return(null);
            }
            return(FromGameObject(sel.GameObjects.First()));

            // ToDo: Probably improve later
        }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
        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;
        }
Ejemplo n.º 4
0
 public PrefabAppliedEventArgs(ObjectSelection obj) : base(obj.HierarchyExpand(), new PropertyInfo[0])
 {
 }
Ejemplo n.º 5
0
 public ObjectPropertyChangedEventArgs(ObjectSelection obj, bool persistenceCritical = true) : this(obj, null, persistenceCritical)
 {
 }