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