/// <summary> /// 创建GraphView /// </summary> private void ConstructGraphView() { // 默认EditorWindow里只有一个GraphView graphView = new FSMGraphView() { name = "Dialogue Graph" }; // 拉伸到和EditorWindow相同大小 graphView.StretchToParentSize(); graphView.rootVisualElement = rootVisualElement; // 添加到root rootVisualElement.Add(graphView); }
public FSMStateNode(FSMGraphView fsmGraphView) { this.fsmGraphView = fsmGraphView; //title = "title"; titleContainer.RemoveAt(0); selectStateButton = new Button(SelectState) { text = "Select State" }; titleContainer.Insert(0, selectStateButton); inputContainer.Add(InputPort = AddInputPort()); }