[CustomEditor(typeof(Tool))]
public class ToolInspecter : Editor
{
protected Tool m_Tool;
///
/// Component每一次顯示在Inspector上就會重新呼叫一次
///
private void OnEnable()
{
//DO init
m_Tool = target as Tool;
}
///
/// Component從Inspector上移除的瞬間執行
///
private void OnDestroy()
{
//Do origin
}
///
/// 該Component每一次有改變就會呼叫一次
///
public override void OnInspectorGUI()
{
//Do Draw GUI
DrawDefaultInspector();
}