您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
23 行
584 B
23 行
584 B
using UnityEditor;
|
|
using UnityEngine.AI;
|
|
|
|
namespace BoatAttack
|
|
{
|
|
[CustomEditor(typeof(AiController))]
|
|
public class AiControllerEditor : Editor
|
|
{
|
|
public override void OnInspectorGUI()
|
|
{
|
|
var ai = target as AiController;
|
|
|
|
base.OnInspectorGUI();
|
|
|
|
if(EditorApplication.isPlaying) Repaint();
|
|
|
|
EditorGUILayout.LabelField("Current WP", ai.CurWp.ToString());
|
|
|
|
var path = ai.NavPath;
|
|
EditorGUILayout.LabelField("Path Status", path == null ? "N/A" : path.status.ToString());
|
|
}
|
|
}
|
|
}
|