- CustomEditor
- ExecuteInEditMode
- MenuItem
- AddComponentMenu
- ContextMenu
- ContextMenuItem
- Multiline & TextArea
- CreateAssetMenu & PreferBinarySerialization
- DisallowMultipleComponent
- Header
- HelpURL
- HideInInspector
- Range
- RequireComponent
- RuntimeInitializeOnLoadMethod
- SelectionBase
- SerializeField
- Space
- Tooltip
- PreferenceItem
CustomEditor
1 | /// <summary> |
ExecuteInEditMode
1 | /// <summary> |
MenuItem
1 | public class PlugExtendEditor : EditorWindow |
AddComponentMenu
1 | /// <summary> |
ContextMenu
直接上代码上图
1
2
3
4
5 [ContextMenu("DoSomething")]
public void DoSomething()
{
//响应时做某种事情
}
ContextMenuItem
1 | /// <summary> |
Multiline & TextArea
1 | [Multiline(8)] |
ColorUsage
1 | public Color color1; |
CreateAssetMenu & PreferBinarySerialization
1 | /// <summary> |
DisallowMultipleComponent
1 | /// <summary> |
Header
Header
1 | /// <summary> |
HelpURL
1 | /// <summary> |
HideInInspector
1 | /// <summary> |
Range
1 | public class NewBehaviourScript : MonoBehaviour |
RequireComponent
1 | /// <summary> |
RuntimeInitializeOnLoadMethod
1 | /// <summary> |
SelectionBase
1 | /// <summary> |
SerializeField
1 | public class NewBehaviourScript : MonoBehaviour |
Space
1 | public class NewBehaviourScript : MonoBehaviour |
Tooltip
1 | public class NewBehaviourScript : MonoBehaviour |
PreferenceItem
1 | /// <summary> |