public TypeInspector(Accessor accessor) : base(accessor) { hasHideRootAttribute = accessor.HasAttribute <InspectorTypeHideRootAttribute>(); rootTypeFilter = accessor.GetAttribute <TypeFilter>() ?? TypeFilter.Any; accessor.valueChanged += _ => RefreshRootTypeTree(); }
public static void BeginBlock(Accessor accessor, Rect position) { EditorGUI.BeginChangeCheck(); var disabled = !accessor.isEditable || accessor.HasAttribute <InspectorReadOnlyAttribute>() || (accessor.isPrefabInstance && !accessor.supportsPrefabModifications); EditorGUI.BeginDisabledGroup(disabled); // Invoking editorHasBoldFont is expensive, so we're avoiding it as much as possible var bolded = false; if (accessor.hasPrefabModifications) { LudiqGUIUtility.editorHasBoldFont = true; bolded = true; } blockStack.Push(new InspectorBlock(accessor, position, bolded)); }
public virtual bool ShowInFooter(Accessor memberAccessor) { return(memberAccessor.HasAttribute <InspectorShowInFooterAttribute>()); }