diff options
author | chai <chaifix@163.com> | 2021-08-23 22:27:25 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-08-23 22:27:25 +0800 |
commit | bc9c236dff63e8cce202eaa00b52d0743b0316f7 (patch) | |
tree | 3d5f089d7de95cc9dcd956453eaee9f06ec5aca0 /Assets/ActionTool/Editor/ActionColliderEditor.cs | |
parent | 3a71eb54456519256f573a6542b46f9c29443b22 (diff) |
*misc
Diffstat (limited to 'Assets/ActionTool/Editor/ActionColliderEditor.cs')
-rw-r--r-- | Assets/ActionTool/Editor/ActionColliderEditor.cs | 50 |
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))
|