Seneral / Node_Editor_Framework

A flexible and modular Node Editor Framework for creating node based displays and editors in Unity
https://nodeeditor.seneral.dev
MIT License
2k stars 415 forks source link

Issue in ConnectionKnobAttribute::UpdateProperties andknob.sideOffset #175

Closed xyzDave closed 5 years ago

xyzDave commented 5 years ago

When using the offsets for knob graphics, I noticed the values passed as nodeSidePos made no difference. This issue appears to be caused by an error in ConnectionKnobAttribute::UpdateProperties

Looking in updateProperties the code is:

public override void UpdateProperties (ConnectionPort port) 
{
..          
            if (NodeSidePos != 0)
                knob.sidePosition = NodeSidePos;
            knob.sideOffset = 0; 
}

In the above if NodeSidePos is not zero, then knob.sidePosition is set to NodeSidePos. BUT then on the next line knob.sideOffset is set to zero - meaning the lines above are pointless. I suspect knob.sideOffset = 0; should be removed? Or maybe the whole "if" statement?

xyzDave commented 5 years ago

Ignore this - having an off day - one is position, one is offset. I'll add code to allow setting of the offset.