red-owl-games / Sleipnir

A Graph Framework for Unity
43 stars 5 forks source link

Edge color #2

Closed rever96 closed 2 years ago

rever96 commented 2 years ago

Hi, this is a good package, but it's too much for my needs. I wanna asks how did you colored the edges like this: image

p.s. math.EPSILON_DBL is no longer supported

rever96 commented 2 years ago

ok, I've found it! In the node I have to specify the port color

public class NodeView : Node
    {
        [...]
        public readonly Port inputPort;

        public NodeView(StateData stateData)
        {
               [...]
                inputPort = base.InstantiatePort(Orientation.Horizontal, Direction.Input, Port.Capacity.Multi, typeof(bool));
                inputPort.portName = "precedente";
                inputPort.portColor = Color.green;
                inputContainer.Add(inputPort);
        }
 }