McManning / McManning/BlueGraph
Open graph loses connections after reload
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 256
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Description
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).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in Assets/Scripts/BlueGraph/Editor/CanvasView.cs, at AddNodeViews around the reported line and the CanvasView rebuild path. Reproduce the issue in Unity 2023 by changing code while a graph is open, then verify that connections survive recompilation and the connected-node error no longer appears in the log.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, unity
- Domain
- game-dev, tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100