Search Unity

FlowCanvas - Visual Scripting Similar to Unreal Blueprints

Discussion in 'Assets and Asset Store' started by nuverian, Apr 14, 2015.

  1. Dreamer1986

    Dreamer1986

    Joined:
    Jun 30, 2015
    Posts:
    7
    So instead of giving me a straight answer, while knowing the solution, you tell me that the answer can be found somewhere. Gee, thanks, how nice.
     
  2. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hello,
    I am sorry for the late reply. Please consider using the official forums for faster support if you can :)
    The CoolDown node is quite simple in what it does. It basically filters the input flow to not be possible to call very frequently.
    CoolDown.gif

    In the above example, notice that the "Finish" output is called only every 0.5 seconds even though I have button pressed down continuously. The "Start" output is also filtered and called every "X" seconds, but the difference between "Start" and "Finish" outputs, is that "Start" is called once in the same frame that CoolDown is called, while "Finish" is called once, after the CoolDown time has come to pass. (Update is called while the "cooling down" by the way).

    You could certainly use a CoolDown node for what you are after. Another alternative for that use case, could also be to use the "Do Once" node, if you actually want to perform something only once, and time is irrelevant.

    Let me know if that works for you, or if you have any other questions.
    Thanks.

    Hello,
    Unfortunately, Unity 5.3 is no longer supported as it is quite an old version right now. FlowCanvas only works on Unity 5.6 and above up to current Unity version 2018.x of course, and this error you are receiving is related to this.
    Please update to at least Unity v5.6 if possible. Thank you.

    Thank you for sharing. I think the video link is broken by the way as it can't seem to possible to play :)

    Hey,
    You are right. I've further changed/improved the browser (yet again). I will probably add this as an option as well. If you want to bring back the categorization until the next version comes up, please open up GenericMenuBrowser.cs and un-comment the lines found around #360.
    Thank you!

    Hello :)

    The way you are doing it already with a variable and using the Get/Set Variable nodes, while not exactly temporary, is though pretty much correct :) If you don't want to clutter the list of variables on the other hand, you can alternatively, add a "Set Of Type (T)" and/or "Get Of Type (T)" nodes, and within the dropdown of variable selection in that node's inspector, select "DynamicVar" and give it a name.

    DynamicVar.png

    As you notice above, this will show in red because there is no variable actually linked to it, but doing this, will create a variable to be used in runtime. The benefit of this is that is saves you space on the list of variables, but on the other hand and because there is no dropdown variable selection menu, you have to be a bit extra careful about the variable naming :)

    Let me know if you have any more questions.
    Thanks.
     
  3. ThermodynamicsMakesMeHot

    ThermodynamicsMakesMeHot

    Joined:
    Feb 14, 2015
    Posts:
    224
    Your welcome. I am glad you realize how nice I was in helping you with some hints to help yourself.

    I am glad you recognized that next time, by spending a few seconds reading the description about an asset, you can save yourself all sorts of wasted time.

    Just saying....To ask for help when you can't be bothered to RTFM or a simple asset store description about supported Unity versions is frankly wasting others time.

    But again, I am glad you saw how nice I was by dropping hints on how to find these answers yourself in the future.
     
  4. ThermodynamicsMakesMeHot

    ThermodynamicsMakesMeHot

    Joined:
    Feb 14, 2015
    Posts:
    224
    I fixed it, thanks.
     
  5. lemonaid

    lemonaid

    Joined:
    Aug 27, 2016
    Posts:
    5
    Thank you very much, have finished most of my first prototype.

    I have another question. I do have a list variable on my blackboard called Enemies, how to I get it's Count? Like in enemies.Count on c#?
     
  6. hard_code

    hard_code

    Joined:
    Aug 29, 2013
    Posts:
    238
    Just drag the Variable from the blackboard into the graph and choose Get. Then drag a wire off the Get node value output and choose List -> Properties -> Get Count
     
    nuverian likes this.
  7. lemonaid

    lemonaid

    Joined:
    Aug 27, 2016
    Posts:
    5
    Thank you very much, kind Savior!
    Worked like a charm!
     
    nuverian likes this.
  8. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hello everyone.
    Just a heads up on the new feature coming around that is frequently requested, that being the ability to Convert a selection of nodes into a nested Macro. I hope you find it useful :)
    ConverToMacro.gif
     
    Last edited: Oct 3, 2018
    jrumps, coverpage, uni7y and 2 others like this.
  9. Innocent-Dev

    Innocent-Dev

    Joined:
    Apr 1, 2015
    Posts:
    23
    Awesome can't wait
     
  10. arie1994

    arie1994

    Joined:
    Jun 30, 2016
    Posts:
    86
    As I understand nodecanvas is the asset for dialogue tree's but I'm planning to use flowcanvas as a dialogue and quest authoring system. is it a good idea or am I missing something?
     
  11. uni7y

    uni7y

    Joined:
    Jul 23, 2012
    Posts:
    287
    update is in the asset store now, let's test the "convert nodes to a macro" ;)

    EDIT: works like a charm... did not expect anything else, I love this asset!
     
    Last edited: Oct 4, 2018
    nuverian likes this.
  12. blacksun666

    blacksun666

    Joined:
    Dec 17, 2015
    Posts:
    214
    Your website is down, getting ERR_CONNECTION_TIMED_OUT. Did try emailing you yesterday about it but not sure your email is working either as I haven't had a reply.
    The address from dns is pingable, but an httping to port 80 is taking > 1700ms.
    Still trying to look at the nodecanvas and flowcanvas change logs as the asset store update history just gives a url rather than any details.
    Tried from Manchester and London IP addresses (two different isps in the UK) in case it was an issue with my isp.
     
  13. uni7y

    uni7y

    Joined:
    Jul 23, 2012
    Posts:
    287
    same here in the Netherlands...
     
  14. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hello everyone,

    I just woke up to see that the websites are down. I have contacted the host service just now and hope that is is resolved ASAP! I am sorry for the inconvenience.
     
    uni7y likes this.
  15. DeadNinja

    DeadNinja

    Joined:
    Jun 3, 2013
    Posts:
    39
    2.8.5 break my custom flownodes

    Lets say i have a simple class
    Code (CSharp):
    1.  public class SomeClass: MonoBehaviour
    2.     {
    3.         void Awake()
    4.         {
    5.             Debug.Log("doing some property initialization here");
    6.         }
    7.  
    8.         public void SomeMethod()
    9.         {
    10.             Debug.Log("do something with initialized property");
    11.         }
    12.     }
    and simple FlowNode
    Code (CSharp):
    1. public class SimpleNode : FlowNode
    2.     {
    3.         [RequiredField] public BBParameter<SomeClass> target;
    4.  
    5.         protected override void RegisterPorts()
    6.         {
    7.             var flowOutput = AddFlowOutput("Out");
    8.             AddFlowInput("In", (f) =>
    9.             {
    10.                 target.SomeMethod();
    11.                 flowOutput.Call(f);
    12.             });
    13.         }
    14.     }
    now i creating simple flow:

    OnStart or OnEnable -> SimpleNode

    result: SimpleNode will be executing BEFORE SomeClass Awake which is totaly wrong.
     
  16. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hello,

    This does not really have to do with the new 2.8.5 version as much as of course with the order of execution of scripts.
    A FlowScriptController, "enables" the flowscript assigned to it, from within it's "OnEnable" Unity callback. At that point, flowScript OnAwake, OnStart and OnEnable are called (in that order). Thus the problem here, is that FlowScriptController is enabled before SomeClass. The simplest of fixes would of course be to open up Unity's Script Execution Order, and adding FlowScriptController after Default Time.
    I will also see if there is another/better solution to this.

    Thanks!
     
  17. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Just a heads up for everyone!
    Coming in the next version is the ability to freely re-link connections, both input and output without a fuss!
    Relinking.gif
     
  18. DeadNinja

    DeadNinja

    Joined:
    Jun 3, 2013
    Posts:
    39
    If i creating simple flows like OnStart -> Call Method via reflection - all work as it should, but it goes wrong with custom nodes that do exactly the same. So to me its clearly inconsistency. Im realy like flowcanvas/nodecanvas/slate trio - all three is base components in any of my projects for year+ and knowing now that the real problem as you say OnAwake/OnStart/OnEnable is flowcanvas own abstract order (all calling in OnEnable phase) not the expected standart monobehaviour event order, so now i need to doublecheck all my flows from that point of view.
     
    nuverian likes this.
  19. Zimbwawa

    Zimbwawa

    Joined:
    Apr 19, 2018
    Posts:
    3
    Are there any negatives to using flowcanvas over the normal scripting?
    Things like slower run time and lack of ability to do certain things?
    Looks really great.
     
  20. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Thank you very much for your feedback and for using the tools in your projects. I want to let you know that I am changing this for the next version to better suit Unity standard order rather than being called in the same frame (even though they were still in order).
    Thank you for your feedback once again.

    Hello,
    While FlowCanvas is very perfomance optimized and there are a lot of possibilities you can achieve in similarities with normal scripting, it is certainly not the same. Normal scripting will always be faster and be possible to achieve more things (like creating FlowCanvas :) ), but it wouldn't be possible to create FlowCanvas with itself. Having said that, FC is very fast and has a real lot of possibilities for sure!
    Thanks!
     
    DeadNinja likes this.
  21. Nathan-Liu

    Nathan-Liu

    Joined:
    Apr 27, 2017
    Posts:
    8
    In other words, the reason why I no longer use flowcanvas is that it is different from the life cycle of
    Unity. I said what you said to Nuverian , but I still don't see him adjust the life cycle of Flowcanvas.
     
  22. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hello,
    I am really sorry about that. While I didnt manage to make this into the recent version that has gone live yesterday as I said to @DeadNinja I will, it is schedueled for the next version. There has really been a lot of work put into the recent version.
    Thank you.
     
  23. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    The new version 2.9.0 has recently gone live!

    Due to major files and folder restructure, you should please remove the previous installation folder and re-import FlowCanvas anew.
    • New: Major files and folders restructure. This also allows usage of Unity Assembly Definitions.
    • New: All nodes now have 3 Display Verbose Levels -> 1) Minimal (no ports displayed) 2) Partial (only connected ports displayed) 3) Full (all ports displayed).
    • New: Display Verbose Levels can be changed from either the Graph Editor toolbar, or individually with the new icon button shown above nodes.
    • New: Connections can now be re-linked (both source and target ports), by click and drag the connection.
    • New: When dragging a port connection (or re-link), possible target nodes are now highlighted.
    • New: The Minimap now also shows connections, as well as selected nodes and execution status.
    • New: Improved ports GUI and layout to require much less horizontal space for the node to display as well as clarify separation between Flow and Value ports.
    • New: Custom Event node now has an extra output “Sender”, which is the object that send the event.
    • New: Blackboard Variables can now be duplicated (through a variable’s options button).
    • New: Added AutoConverts for quaternions.
    • Mod: First graph execution is now OnStart instead of OnEnable.
    • Mod: Stepped and Linear connection visual modes are removed.
    • Mod: Re-added previously deprecated Internal Var nodes.
    • Mod: Connections are now easier to click.
    • Mod: Complete refactor of StyleSheets.
    • Mod: Removed source PSD files for icons.
    • Mod: Some general improvements to GUI styles, icons and colors.
    • Fix: Nodes GUI size is now always relevant to it’s content.
    • Fix: Ocasional GUI connections flickering when using node inspector.
    • Fix: Safe check in Custom Function node to only run once concurently.

    Some visuals bellow

    Nodes now have a "Display Verbose Level". Minimal, Partial and Full. Individually, this can be changed either with the relevant GUI button, or with the shortcut keys 1, 2 and 3 while hovering a node.
    _VerboseLevel.gif

    Verbose Level, can also be changed more globally through the relevant/similar toolbar buttons, which affect either the selected nodes, or all nodes if no selection exists.
    _GlobalKeys.gif

    While in Minimal or Partial modes and to speed things up, there exists a special shortcut (Key S) which will temporarily fully expand the node (while cursor hover above node) and thus allow to quickly make new connections.
    _TempPop.gif

    As shown in a previous post, connections can now be relinked without a hassle both source as well as target. Notice that when not in Full Verbose Mode (like bellow) only ports that are able to be connected to dragged connection are displayed on target node.
    _Relink.gif

    The minimap is improved to show current selected node(s) as well as connections too.
    _MinimapImprovements.gif

    Unless a hotfix is required, next version will most probably be version 3.0 along with some major improvements, changes, major requests, as well as new features!

    Cheers!
     
    Last edited: Nov 7, 2018
  24. hard_code

    hard_code

    Joined:
    Aug 29, 2013
    Posts:
    238
    Will 3.0 be a paid upgrade? What are some of the major features you are planning?

    PS

    Thanks for the Duplicate feature and the node verbose modes :)
     
    nuverian likes this.
  25. Nathan-Liu

    Nathan-Liu

    Joined:
    Apr 27, 2017
    Posts:
    8

    Anyway, I hope flowcanvas will get better and better.
     
    nuverian likes this.
  26. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hey,

    I am sorry for the late reply. Version 3.0 is planned to be a free upgrade :)
    Some of the features planned for this version and in no specific order are:
    • Bound Macros (instead of only asset referenced Macros).
    • Local Blackboards for flowScripts (instead of only object-based blackboards).
    • Blackboard Variables "Inheritance" (have a blackboard inherit another blackboard's variables).
    • Runtime code generation (for AOT platforms).
    • Refactoring tools (like batch replace variable reference, or reflected member "reference").
    • Serialization performance improvements.
    • Some other certain surprises I can't disclose at the moment :)
    Cheers!
     
  27. hard_code

    hard_code

    Joined:
    Aug 29, 2013
    Posts:
    238
    Awesome. Those features sound great!
     
    nuverian likes this.
  28. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    961
    Hi all,

    Can someone give me a quick rundown on why I might want to use FlowCanvas with NodeCanvas, from what I can see the FlowCanvas offers to replace simple glue code and NodeCanvas offer to replace gameplay logic code. Is that the distinction here?

    My question is what can be achieved in FlowCanvas that isn't easily achievable by NodeCanvas using FSM.

    (I consider myself pretty competent with C#, but would love to see if FlowCanvas and NodeCanvas can give some nice structure to the whole game and speed iteration)
     
  29. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,913
    FlowCanvas is a replacement for C# coding. Full visual scripting.

    NodeCanvas is for FSM/Behaviour Trees. So it's good for states/AI.
     
    nuverian likes this.
  30. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    961
    I believe FlowCanvas include actions for more Unity API so users don't have to code, but from what I can see NodeCanvas also offer many Unity API actions for FSM/BT, so I imagine it's more of a "how much code" it can replace.
     
  31. hard_code

    hard_code

    Joined:
    Aug 29, 2013
    Posts:
    238
    I use both together. The way I think of it is Flowcanvas is used as super states that do multiple things when the state (or leaf in behavior tree) is entered in on enable, update, and on disable.

    This allows me to swap in and out behaviors (flows) easily and keep the flows simple.

    Nodecanvas by itself gets complex when you need 10 actions per state or leaf. Flowcanvas by itself gets complex because you have no statemachine or behavior tree and have to wire up all the conditions.

    Edit I do wish we could use flows as conditions cause some conditions can get complex.
     
    Last edited: Nov 28, 2018
    nuverian and bitinn like this.
  32. MaccyDBoy

    MaccyDBoy

    Joined:
    May 25, 2017
    Posts:
    30
    Hi !

    Is there a way to call a ''Custom Function node'' from another script outside ? which is not using FlowCanvas ? Like getcomponent<Blackboard>().Call(methodname);

    Thanks ! :)
     
  33. MadAboutPandas3

    MadAboutPandas3

    Joined:
    Jul 3, 2017
    Posts:
    29
    Hi,

    I just bought your asset. Looks nice so far.
    You support coroutines in the class LatentActionNode and provided the sample WaitNode. Unfortunately this code produces memory garbage. It is 9 bytes by Unity Coroutines. Another garbage comes from the new op of the two queues. Just instantiate them earlier. It comes in unhandy when the Garbage Collector runs and causes frame drops on VR/mobile.

    Can you make a node with a possibility to delay but without coroutines? Think about async tasks or simple time math in the Update function?

    Thanks
     
    Last edited: Dec 11, 2018
    nuverian likes this.
  34. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    @Everyone : Please use the official forums for support and faster responses. Thank you!

    Hello,

    Yes, it is possible to call a Custom Function from within code likeso:
    GetComponent<FlowScriptController>().CallFunction("MyFunction");

    If you Custom Function also has parameters, you can pass such parameters in the CallFunction method likeso:
    GetComponent<FlowScriptController>().CallFunction("MyFunction", 10, false);

    Note though, that the order of the parameters should be the same as defined in the Custom Function (node).

    Thanks!
     
  35. Jason210

    Jason210

    Joined:
    Oct 14, 2012
    Posts:
    131
    Can this be used on your own code, so it can be viewed visually?
     
  36. jadynut

    jadynut

    Joined:
    Aug 27, 2015
    Posts:
    1
    Hello, there's an issue in my project, please help.

    a "Send Event" node need to send an event to a flowcanvas graph on another game object.
    When running in Unity editor, everything is correct, and I get the result I want.
    But after I built and running on iPhone, that game object just can't receive this event.

    I have generated AOT classes and link.xml
    Also tried send this event from the flowcanvas graph, and from a C# script, either method works.

    The needed event is during the game play, not in "Awake" function.

    Is there any additional steps needed when using "Send Event"?

    Thanks

    OS: macOS 10.13
    Unity: 2018.3.3f1 personal.
    Flowcanvas: latest version.
    Phone: iPhone 6s 12.1.4
     
    Last edited: Mar 11, 2019
  37. mindfulmx

    mindfulmx

    Joined:
    Mar 21, 2017
    Posts:
    42
    Hello,
    I'm doing a billiard-pool kind of game
    My intention is to start a timer with a countdown when starting the game
    And I have to put 4 balls before the time runs out

    Once I have managed to get 4 balls, the time stops and gives me a score (the remaining time)

    I already have the whole physical system for the game, I just need to manage the timer and the scores

    Can you give me an idea of how to do it with FlowCanvas?

    Thanks in advance!

    T
     
  38. CFCF2

    CFCF2

    Joined:
    Feb 16, 2019
    Posts:
    15
    I’ve been wanting to make a Fighting game using Visual Scripting for a while and with the May Madness Sale, this seems like the best option. So, my question is - Can you use Flow Canvas to make a 1-4 player Fighting game with regular fighting game terminology (Intros, Outros, Health, Super Meter, Special Moves, Supers, Hitstun, Dizzy, etc.) that also has Stage Mashups and Item Drops (think PlayStation All-Stars) and a Story Mode (think Super Smash Bros. Brawl)?
     
  39. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    @everyone : Please consider joining the official forums or the discord server for faster replies.
    Thank you!


    FlowCanvas can access your own code and call methods, get/set properties and fields, subscribe to events etc, via reflection if that is indeed what you mean.
    If you have further questions, please drop by the discord serveror the forums :)
    Thank you.

    Can you please start a new support topic in the official forums (or directly email me (support_AT_paradoxnotion.com) if you haven't already?
    Thank you.

    Hello,
    Please take a look at the "Cooldown" node. I think it will be very adequate for use for what you want to achieve.
    If you have any more questions, please consider coming by the forums or the discord server.
    Thanks!

    Hello,
    I don't see any reason not to :) FlowCanvas is very flexible visual scripting solution and can be used to create a great lot of things. A fighting game would certainly be possible, but please do understand that there are no fighting game specific nodes (or any genre specific nodes for that matter), thus it really depends on how you utilize the system and to some extend, your knowledge of Unity's API for anything that you want to create of course.
    If you have any more questions please consider coming by the official forums or the discord server.
    Thanks!
     
    mindfulmx likes this.
  40. Zimbwawa

    Zimbwawa

    Joined:
    Apr 19, 2018
    Posts:
    3
    Will it effect the frame rate of my project?
     
  41. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    It depends on what you mean. FlowCanvas is very fast after initialization. Initialization (that is, when a graph is loaded) can incur in a performance drop due to the graph being deserialized, but after that, running the flowscripts (visual code) are very optimized and fast. Not as fast as executing direct c# code of course, that would not be possible, but the difference is marginal, except for in some very special situations, like for example when utilizing the automatic type conversion feature.

    Thank you.
     
  42. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
  43. ZomBJ

    ZomBJ

    Joined:
    Jun 28, 2014
    Posts:
    7
    Hi, I'm probably just overlooking this, but is there a way to have FlowCanvas lock the cursor? Something along the lines of OnStart -> LockCursor? I don't seem to be able to find any kind of Cursor Lock State function in the documentation or searching in the function/variable windows. Right now, I just a have a simple C# script that manages my cursor lockstate (lock on start, unlock when paused, relock when unpause), but it would be nice if I could just make that a part of my FPS movement canvas, so that it's all in one place.
     
  44. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hello,

    You will need to please add the "Cursor" type in the Preferred Types List Editor. Only members (like methods) of the types added in the Preferred Types are showing up in the menus to avoid cluter. Once you've added the Cursor type in the list, you will be able to call the "Cursor.Set Lock State" method (there will now be a node for that in the browser).

    Thanks :)
     
  45. Bastienre4

    Bastienre4

    Joined:
    Jul 8, 2014
    Posts:
    191
    Hello
    I tried passing our project in 2019.3.0b1 in order to see if we could use the fast play mode enter/exit.
    Unfortunatly it seem to cause issue with FlowCanvas (NodeCanvas here, but I guess it's the same with FC).
    upload_2019-8-28_15-1-20.png
    The repro for this is :
    1) Disable domain reload/scene reload (project settings/editor)
    2) Enter play mode, do some node canvas dialogues in a scene
    3) Exit play mode, change scene
    4) Enter play mode, do some node canvas dialogues in this other scene
    I don't know if the scene change is needed, but it does happen this way for me.

    PS: Is it possible it's related to isQuitting not being set to false after play mode exit since the domain is not reloaded anymore?
    upload_2019-8-28_15-4-33.png
    Thanks and have a nice day!
     
  46. hard_code

    hard_code

    Joined:
    Aug 29, 2013
    Posts:
    238
  47. Bastienre4

    Bastienre4

    Joined:
    Jul 8, 2014
    Posts:
    191
    I'll join the discord.
    If it can help anyone, I've made workaround (fix?) for the current version on the MonoManager.cs
    upload_2019-8-28_17-51-3.png
     
    hard_code likes this.
  48. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hi everyone.

    A new version of FlowCanvas that now properly supports and looks nice in the new Unity Editor GUI Theme (2019.3.x) has recently gone live on the Asset Store. If you want to check the whole changes of this update as well as the previous ones of course, they can always be found here: https://flowcanvas.paradoxnotion.com/documentation/change-log/ :)

    Thanks!
     
  49. Paprik

    Paprik

    Joined:
    May 25, 2014
    Posts:
    14
    Hi,
    we tried using the new fast play mode and FlowCanvas is throwing a lot of errors (MonoManager singleton not getting reset properly etc.). Will you support this new feature anytime soon?

    Thank you!
     
  50. Bastienre4

    Bastienre4

    Joined:
    Jul 8, 2014
    Posts:
    191
    You can use this fix

     
    nuverian and Paprik like this.