Inheritance: System.Attribute
Beispiel #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);
        }
Beispiel #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);
                }
            }
        }