@@ -186,6 +186,7 @@ private void HandleNewAttribute(PropertyAttribute attribute)
186186 {
187187 labelProcessorAttribute = a ;
188188 }
189+
189190 return ;
190191 case LabelByChildAttribute a :
191192 if ( ! isArray )
@@ -336,25 +337,6 @@ private void CloseDecoratorDrawers(PropertyCondition conditionState = PropertyCo
336337 }
337338 }
338339
339- //TODO: replace this method with validation attributes
340- private void ProcessLabel ( SerializedProperty property , GUIContent label )
341- {
342- if ( labelProcessorAttribute == null )
343- {
344- return ;
345- }
346-
347- switch ( labelProcessorAttribute )
348- {
349- case NewLabelAttribute a :
350- label . text = a . NewLabel ;
351- return ;
352- case LabelByChildAttribute a :
353- PropertyUtility . OverrideLabelByChild ( label , property , a . ChildName ) ;
354- return ;
355- }
356- }
357-
358340 private void HandleDecorator ( ToolboxDecoratorAttribute attribute , bool onBegin , PropertyCondition conditionState = PropertyCondition . Valid )
359341 {
360342 var drawer = ToolboxDrawerModule . GetDecoratorDrawer ( attribute ) ;
@@ -396,6 +378,25 @@ private PropertyCondition Validate(SerializedProperty property)
396378 return ToolboxDrawerModule . GetConditionDrawer ( conditionAttribute ) ? . OnGuiValidate ( property , conditionAttribute ) ?? PropertyCondition . Valid ;
397379 }
398380
381+ //TODO: replace this method with validation attributes
382+ private void ProcessLabel ( SerializedProperty property , GUIContent label )
383+ {
384+ if ( labelProcessorAttribute == null )
385+ {
386+ return ;
387+ }
388+
389+ switch ( labelProcessorAttribute )
390+ {
391+ case NewLabelAttribute a :
392+ label . text = a . NewLabel ;
393+ return ;
394+ case LabelByChildAttribute a :
395+ PropertyUtility . OverrideLabelByChild ( label , property , a . ChildName ) ;
396+ return ;
397+ }
398+ }
399+
399400
400401 /// <summary>
401402 /// Draw property using built-in layout system and cached <see cref="ToolboxAttributeDrawer"/>s.
0 commit comments