Esempio 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
        }
Esempio 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;
        }
Esempio 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;
        }
Esempio n. 4
0
 public PrefabAppliedEventArgs(ObjectSelection obj) : base(obj.HierarchyExpand(), new PropertyInfo[0])
 {
 }
Esempio n. 5
0
 public ObjectPropertyChangedEventArgs(ObjectSelection obj, bool persistenceCritical = true) : this(obj, null, persistenceCritical)
 {
 }