/// <inheritdoc/> public virtual bool TryGetForDecoratorDrawer([NotNull] PropertyAttribute fieldAttribute, [NotNull] Type propertyAttributeType, IParentDrawer parent, LinkedMemberInfo attributeTarget, [CanBeNull] out IDecoratorDrawerDrawer result) { return(wrappedProvider.TryGetForDecoratorDrawer(fieldAttribute, propertyAttributeType, parent, attributeTarget, out result)); }
/// <inheritdoc/> public bool TryGetForDecoratorDrawer([NotNull] PropertyAttribute fieldAttribute, [NotNull] Type propertyAttributeType, [CanBeNull] IParentDrawer parent, [NotNull] LinkedMemberInfo attributeTarget, [CanBeNull] out IDecoratorDrawerDrawer result) { var drawerType = GetDrawerTypeForDecoratorDrawerAttribute(propertyAttributeType); if (drawerType != null) { #if DEV_MODE && (DEBUG_GET_FOR_FIELD || DEBUG_GET_FOR_DECORATOR_DRAWER) Debug.Log("<color=green>DecoratorDrawer drawer</color> for field " + attributeTarget.Name + " and attribute " + fieldAttribute.GetType().Name + ": " + drawerType.Name); #endif result = GetOrCreateInstance <IDecoratorDrawerDrawer>(drawerType); #if UNITY_EDITOR Type decoratorDrawerType; if (CustomEditorUtility.TryGetDecoratorDrawerType(propertyAttributeType, out decoratorDrawerType)) { result.SetupInterface(fieldAttribute, decoratorDrawerType, parent, attributeTarget); result.LateSetup(); return(true); } #endif if (!result.RequiresDecoratorDrawerType) { result.SetupInterface(fieldAttribute, null, parent, attributeTarget); result.LateSetup(); return(true); } #if DEV_MODE Debug.LogError(result.GetType().Name + " was returned for propertyAttribute " + propertyAttributeType.Name + " but drawer requires a decoratorDrawerType which was not found."); #endif } #if DEV_MODE && (DEBUG_GET_FOR_FIELD || DEBUG_GET_FOR_DECORATOR_DRAWER) Debug.Log("<color=green>DecoratorDrawer drawer</color> for field " + attributeTarget.Name + " and attribute " + fieldAttribute.GetType().Name + ": " + StringUtils.Null); #endif result = null; return(false); }