Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open graph loses connections after reload #62

Open
AncientPixel opened this issue Oct 24, 2023 · 1 comment
Open

Open graph loses connections after reload #62

AncientPixel opened this issue Oct 24, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@AncientPixel
Copy link

AncientPixel commented Oct 24, 2023

I love BlueGraph for its simplicity and ease of use but still being customisable. An issue I have with it in Unity 2023 is that if a graph is open and I make a code change the connections of the graph get dropped with an error to the log. This is in the CanvasView 'rebuild' of node, port and connection views.

Error:
Could not connect Journal Page:ExecIn: Connected node no longer exists. UnityEngine.Debug:LogError (object) BlueGraph.Editor.CanvasView:AddNodeViews (System.Collections.Generic.IEnumerable1<BlueGraph.Node>,bool,bool) (at Assets/Scripts/BlueGraph/Editor/CanvasView.cs:631)

It seems during recompiling the reference to the port in the Connection class is lost but never reestablished.

To fix this, in the CanvasView.cs file in the AddNodeViews function add port.UpdateConnections(); around line ~610 just below foreach (var port in node.Key.Ports.Values).

@AncientPixel AncientPixel added the bug Something isn't working label Oct 24, 2023
@TehMighty
Copy link

I love BlueGraph for its simplicity and ease of use but still being customisable. An issue I have with it in Unity 2023 is that if a graph is open and I make a code change the connections of the graph get dropped with an error to the log. This is in the CanvasView 'rebuild' of node, port and connection views.

Error: Could not connect Journal Page:ExecIn: Connected node no longer exists. UnityEngine.Debug:LogError (object) BlueGraph.Editor.CanvasView:AddNodeViews (System.Collections.Generic.IEnumerable1<BlueGraph.Node>,bool,bool) (at Assets/Scripts/BlueGraph/Editor/CanvasView.cs:631)

It seems during recompiling the reference to the port in the Connection class is lost but never reestablished.

To fix this, in the CanvasView.cs file in the AddNodeViews function add port.UpdateConnections(); around line ~610 just below foreach (var port in node.Key.Ports.Values).

This doesn't seem to fix the problem for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants