summaryrefslogtreecommitdiff
path: root/Assets/ActionTool/Editor/ActionColliderEditor.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/ActionTool/Editor/ActionColliderEditor.cs')
-rw-r--r--Assets/ActionTool/Editor/ActionColliderEditor.cs50
1 files changed, 27 insertions, 23 deletions
diff --git a/Assets/ActionTool/Editor/ActionColliderEditor.cs b/Assets/ActionTool/Editor/ActionColliderEditor.cs
index a883bd46..a446b61d 100644
--- a/Assets/ActionTool/Editor/ActionColliderEditor.cs
+++ b/Assets/ActionTool/Editor/ActionColliderEditor.cs
@@ -97,19 +97,7 @@ namespace ActionTool
bool skip = false;
foreach (var attr in field.GetCustomAttributes())
{
- if (attr.GetType() == typeof(TooltipAttribute))
- {
- TooltipAttribute tooltipattr = attr as TooltipAttribute;
- if (tooltip != null)
- {
- tooltip = tooltipattr.tooltip;
- }
- }
- else if(attr.GetType() == typeof(DisallowModifiyInGUI))
- {
- GUI.enabled = false;
- }
- else if(attr.GetType() == typeof(ColliderTypeAttribute))
+ if(attr.GetType() == typeof(ColliderTypeAttribute))
{
ColliderTypeAttribute t = attr as ColliderTypeAttribute;
collliderType = (int)t.type;
@@ -158,16 +146,6 @@ namespace ActionTool
break;
}
}
- else if (attr.GetType() == typeof(SpaceAttribute))
- {
- SpaceAttribute space = attr as SpaceAttribute;
- GUILayout.Space(space.height);
- }
- else if (attr.GetType() == typeof(CommentAttribute))
- {
- CommentAttribute comment = attr as CommentAttribute;
- EditorGUILayout.LabelField(comment.comment);
- }
else if (attr.GetType() == typeof(FoldoutAttribute))
{
if(collliderType == -1 || collliderType == (int)collider.type)
@@ -201,6 +179,32 @@ namespace ActionTool
continue;
}
+ foreach (var attr in field.GetCustomAttributes())
+ {
+ if (attr.GetType() == typeof(TooltipAttribute))
+ {
+ TooltipAttribute tooltipattr = attr as TooltipAttribute;
+ if (tooltip != null)
+ {
+ tooltip = tooltipattr.tooltip;
+ }
+ }
+ else if (attr.GetType() == typeof(DisallowModifiyInGUI))
+ {
+ GUI.enabled = false;
+ }
+ else if (attr.GetType() == typeof(SpaceAttribute))
+ {
+ SpaceAttribute space = attr as SpaceAttribute;
+ GUILayout.Space(space.height);
+ }
+ else if (attr.GetType() == typeof(CommentAttribute))
+ {
+ CommentAttribute comment = attr as CommentAttribute;
+ EditorGUILayout.LabelField(comment.comment);
+ }
+ }
+
GUI_Label(new GUIContent(name, tooltip), styles.textBold);
if (field.FieldType == typeof(Vector3))