First of all, FlowCanvas is awesome! I’m using it to develop rapid prototyping tools and it is turning out to be everything I hoped it would be.
It does however feel like a framework that has a way to go before it can be considered mature. Keeping it open source helps debugging though, and I am coming up with occasional bugs. So as a general question: what is the right way report a bug? Is there an issue tracker? Or should I just post on the forum?
Now for this specific bug: I am using a Wait node after an OnEnable event. The Break input does not work when called. The reason is that EnableEvent.OnGraphStarted is triggering the flow output, and so LatentActionNodeBase.Begin gets called before its OnGraphStarted method. Since OnGraphStarted resets the currentCoroutine variable, by the time Break is called currentCoroutine is null and so the Break method does nothing.
The solution should probably be making the EnableEvent wait with its flow output invocation till all nodes have been initialized. Is there a workaround I can use in the meantime?
EDIT: I implemented the solution by making the OnEnable event IUpdatable and waiting for the first call to Update.
Thanks a lot for your positive feedback! I am really glad you like FlowCanvas!
There is no dedicated issue tracker right now, but please feel free to use the forums, that would be really fine 🙂
You are very correct about the bug you’ve posted. I will take a look at fixing this properly.
Another solution instead of using IUpdatable, would be to use a coroutine and basically yield for one frame. (nodes can use coroutines).
This is what I’ve done in the new node “Start” that will come in the next version (shown bellow).
(Of course, I still need to fix the OnEnable event order of execution.)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
namespaceFlowCanvas.Nodes{
[Name("On Start")]
[Category("Events/Graph")]
[Description("Called once the first time the Graph is enabled.\nThis is called 1 frame after all Awake events are called.")]
publicclassStartEvent:EventNode{
privateFlowOutput start;
privateboolcalled=false;
publicoverridevoidOnGraphStarted(){
if(!called){
called=true;
StartCoroutine(DelayCall());
}
}
IEnumerator DelayCall(){
yield returnnull;
start.Call(newFlow(1));
}
protectedoverridevoidRegisterPorts(){
start=AddFlowOutput("Once");
}
}
}
If you find any other bugs, or have any suggestions, please feel free to post them! 🙂
Thanks again for the bug report!
Join us on Discord: https://discord.gg/97q2Rjh
Author
Posts
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.