Beispiel #1
0
    void AddSequence()
    {
        SequenceNodeEditor seqNode = CreateInstance <SequenceNodeEditor>();

        seqNode.nodeRect = new Rect(mousePos.x, mousePos.y, 120, 50);
        bt.nodes.Add(seqNode);

        AssetDatabase.AddObjectToAsset(seqNode, bt);
    }
Beispiel #2
0
    void AddSequenceChild()
    {
        SequenceNodeEditor seqNode = CreateInstance <SequenceNodeEditor>();

        seqNode.nodeRect = new Rect(selectedNode.nodeRect.x, selectedNode.nodeRect.y + (selectedNode.nodeRect.height * 2), 120, 50);
        bt.nodes.Add(seqNode);
        selectedNode.AddChild(seqNode);

        AssetDatabase.AddObjectToAsset(seqNode, bt);
    }