示例#1
0
 [MenuItem("PathTool/Add to List %w")] // 快捷键设置为Ctr + w
 public static void SetNext()
 {
     if (!Selection.activeGameObject || head == null || Selection.GetTransforms(SelectionMode.Unfiltered).Length > 1)
     {
         return;
     }
     if (String.Compare(Selection.activeGameObject.tag, "pathnode", StringComparison.Ordinal) == 0)
     {
         head.AddToTail(Selection.activeGameObject.GetComponent <PathNode>());
     }
 }