Beispiel #1
0
 private void OnDisable()
 {
     //清理缓存
     //这很重要!!!!
     //TODO...
     DPropertyDrawer.ClearCache();
 }
Beispiel #2
0
        //----------------------------------- FOR ShouldDrawField -----------------------------------



        //----------------------------------- FOR DrawField -----------------------------------
        private APropertyDrawer GetPropertyDrawForField(FieldInfo fieldInfo)
        {
            ADrawerAttribute[] ADrawerAttributes = (ADrawerAttribute[])fieldInfo.GetCustomAttributes(typeof(ADrawerAttribute), true);
            if (ADrawerAttributes.Length > 0)
            {
                //获取自定义绘制方案
                APropertyDrawer propertyDrawer = DPropertyDrawer.GetDrawerForAttribute(ADrawerAttributes[0].GetType());
                return(propertyDrawer);
            }
            else
            {
                return(null);
            }
        }