Exemplo n.º 1
0
    public bool LinkPins(EditorPinIdentifier pinA, EditorPinIdentifier pinB)
    {
        EditorPin pinAData = GraphToEdit.GetPinFromID(pinA);
        EditorPin pinBData = GraphToEdit.GetPinFromID(pinB);

        if (!pinBData.CanLinkTo(pinAData))
        {
            Debug.LogWarning("Failed to link pin " + pinA + " to " + pinB + ".");
            return(false);
        }

        GraphToEdit.LinkPins(pinA, pinB);
        return(true);
    }