C#中使用 [属性方法()]
------------------------------------------------------------------------------------
1 AddComponentMenu 在菜单里往GameObject里添加组件实例
用法:@script AddComponentMenu ("Transform/Follow Transform")
class FollowTransform : MonoBehaviour
{
}
------------------------------------------------------------------------------------
2 ContextMenu 使用当前脚本时候可以用右键菜单触发开发环境中运行的函数
用法:@ContextMenu ("Update Waypoints")
function UpdateWaypoints()
{
}
------------------------------------------------------------------------------------