Exemplo n.º 1
0
 private void UpdateTreeName()
 {
     if (treeName != null)
     {
         treeName.text = "行为树视图";
         if (tree)
         {
             if (latestGo)
             {
                 foreach (var exe in latestGo.GetComponents <BehaviourExecutor>())
                 {
                     if (exe.Behaviour == tree)
                     {
                         treeName.text = $"行为树视图\t当前:{(string.IsNullOrEmpty(tree.Name) ? "(未命名)" : tree.Name)} ({exe.gameObject.GetPath()} <{exe.GetType().Name}.{ZetanUtility.GetMemberName(() => exe.Behaviour)}>)";
                         return;
                     }
                 }
             }
             if (!tree.IsRuntime)
             {
                 treeName.text = $"行为树视图\t当前:{(string.IsNullOrEmpty(tree.Name) ? "(未命名)" : tree.Name)} ({AssetDatabase.GetAssetPath(tree)})";
             }
         }
     }
 }