.position()
in its OnCreated
script, it's going to return the origin of the network editor (0, 0), even if we placed the node elsewhere.How can we get the actual position in the
OnCreated
event?I need it to add another node right before it. I was suggested to use
.moveToGoodPosition()
and it partially solves the problem when we connect to an existing node, I assume because this function grabs the inputs position (which already exists and has a proper .position()
), but when we don't connect to anything, this function no longer works in OnCreated, and afterwards when repeated manually in the Python Shell, the exact same command works.