Inheritance: System.Attribute
Esempio n. 1
0
        public bool CanEditType(Type t)
        {
            pb_GizmoAttribute attrib = this.GetType().GetCustomAttributes(true).FirstOrDefault(x => x is pb_GizmoAttribute) as pb_GizmoAttribute;

            if (attrib != null)
            {
                return(attrib.CanEditType(t));
            }

            return(false);
        }
Esempio n. 2
0
        private static void RebuildGizmoLookup()
        {
            gizmoLookup = new Dictionary <Type, Type>();

            foreach (Type t in BuiltinGizmos)
            {
                pb_GizmoAttribute attrib = (pb_GizmoAttribute)((IEnumerable <Attribute>)t.GetCustomAttributes(true)).FirstOrDefault(x => x is pb_GizmoAttribute);

                if (attrib != null)
                {
                    gizmoLookup.Add(attrib.type, t);
                }
            }
        }