private void OnDisable() { //清理缓存 //这很重要!!!! //TODO... DPropertyDrawer.ClearCache(); }
//----------------------------------- 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); } }