void UpdateTreeGraph() { mCopyDo = null; AddHistory(mAssetBinder.source); mBindStack.Clear(); mUndoStack.Clear(); AIGraph.ClearElements(); mContextNode = null; RaycastNode = null; RequestChild(null); if (Application.isPlaying) { var bind = mAssetBinder.RuntimeBinder; while (bind != null) { mBindStack.Insert(0, bind); bind = bind.Parent; } } AIGraph.AddElement(RootNode); if (mAssetBinder.targetTree != null) { List <BTNode> datas = new List <BTNode>(); mAssetBinder.targetTree.GetAllNodes(datas); foreach (var t in datas) { if (t.Asset == null) { mAssetBinder.targetTree.EditorDeleteNode(t); continue; } if (t.Asset is BTNodeAsset) { var node = new BTNodeGUI(this, t); AIGraph.AddElement(node); } } } RootNode.Resize(); mWires.UpdateWires(); var runner = TargetRunner; BlackboardMonitor.Visible = runner != null && Application.isPlaying; BlackboardMonitor.Blackboard = runner == null ? null : runner.Blackboard; }