You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When doing Undo command i lose most of my outputs edges on my custom nodes (on any graph). Am pretty sure my code is the issue (my method may be outdated) but just and case i will post a issues.
Here how most of my dynamic outputs are done
public virtual IEnumerable<PortData> ListPortBehavior(List<SerializableEdge> edges)
{
int outputPortCount = Mathf.Max(1, edges.Count + 1);
for (int i = 0; i < outputPortCount; i++)
{
yield return new PortData
{
displayName = "child " + i,
displayType = typeof(BehaviorTreeLink),
identifier = i.ToString(), // Must be unique
vertical = true,
};
}
}
And and class NodeView i do
//Work around
public override void Enable()
{
nodeTarget.onAfterEdgeConnected += OnStructuralChange;
nodeTarget.onAfterEdgeDisconnected += OnStructuralChange;
}
void OnStructuralChange(SerializableEdge _) => ForceUpdatePorts();
The text was updated successfully, but these errors were encountered:
When doing Undo command i lose most of my outputs edges on my custom nodes (on any graph). Am pretty sure my code is the issue (my method may be outdated) but just and case i will post a issues.
Here how most of my dynamic outputs are done
And and class NodeView i do
The text was updated successfully, but these errors were encountered: