Search Unity

FlowCanvas - Visual Scripting Similar to Unreal Blueprints

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

  1. IFL

    IFL

    Joined:
    Apr 13, 2013
    Posts:
    408
    Really looking forward to this.
    Having the search menu come up would be much faster.
     
    zenGarden likes this.
  2. code-blep

    code-blep

    Joined:
    Oct 1, 2010
    Posts:
    308
    Are there any plans to reflect and make accessible public variables that are in a script in a blackboard?

    For example I add scoreboard.cs to the blackboard. In it is something like "public int score = 0" - it would be epic to be able to get/set the variable and others. Hopefully I explained that ok ;)

    Really looking forward to the other improvements!
     
  3. IFL

    IFL

    Joined:
    Apr 13, 2013
    Posts:
    408
    @Hexagon Neuron - I just did that with Chronos' Timeline.cs. I'm able to access public variables without problem. I drag the variable from the Blackboard to the graph, choose get, then drag the value out to an empty part of the graph to choose what I want. I hope that helps!
     
  4. code-blep

    code-blep

    Joined:
    Oct 1, 2010
    Posts:
    308
    Nope not what I mean ;) The 'variable' I am referring to is a reference to a script in the blackboard. From there it would be nice to get/set public variables in that script without creating a special node to access them.
     
  5. SwiftIllusion

    SwiftIllusion

    Joined:
    Jan 22, 2012
    Posts:
    66
    I'm happy to be totally falling in love with flowcanvas :D, however while making progress I've now been unable to find how to spawn an object on the server. I've tried looking through all the reflected functions and everything but I can't see any way to do anything besides just instantiating an object, which doesn't appear on clients even with a network identity attached to it. Is there some necessary connection I should be making to get access to spawning an object?
    Also if I may ask while I'm at it, is there a clean way to via flowcanvas to also destroy a network spawned object?
     
  6. IFL

    IFL

    Joined:
    Apr 13, 2013
    Posts:
    408
    Well... it works for me. You might need a namespace, accessors, and/or the Type set in the Preferred Types. Though I agree that it'd be best to not require accessors, if that's your problem. Having the accessors takes away the value from the Unity inspector, but if it's in FlowCanvas then it's still almost as usable. Am I still not understanding? :confused: I'm a NC/FC user for only maybe a week, so I don't fully know them yet. My apologies if I've gotten something wrong.
    FC_HexagonNeuron01.jpg

    [EDIT::] Also, no offense meant by referencing a competitor. :eek: I use and like OMT too. They work very differently even though they target similar functionality.
     
    Last edited: May 28, 2016
    code-blep and nuverian like this.
  7. Rixtter

    Rixtter

    Joined:
    Mar 31, 2014
    Posts:
    244
    Last edited: May 29, 2016
    IFL and nuverian like this.
  8. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hey,
    It is now implemented :)

    Hey,
    I suppose you are referring specifically to fields. Field are not yet supported in FlowCanvas for performance reasons, but I have plans for them, yes. Most probably the version after next one :) Properties on the other hand are fully supported of course, like @IFL kindly demonstrated. Thanks!

    Hey,
    Thanks a lot! Very glad you like FlowCanvas. I've replied to your questions in the FlowCanvas forums.
    Let me know if the answer works for you (adding class 'UnityEngine.Network' to preferred types).
    Network.png
    Cheers!
     
    code-blep, SwiftIllusion and IFL like this.
  9. SwiftIllusion

    SwiftIllusion

    Joined:
    Jan 22, 2012
    Posts:
    66
    @nuverian No worries, it has been a serious joy to work with so far ^^ has me excited to be trying to make stuff in Unity again.
    Thanks a ton for your responses, seeing all those additional options available was awesome :D had no idea you were able to add more like that. I was able to find it thankfully, however I've run into an issue where it's saying "Failed Network.Instantiate because we are not connected.", even though I'm functionally able to even connect clients to the server using Unity's network manager HUD and have players instantiating via scripts from another plugin, and even looking at the object with the flowcanvas to instantiate the object, its networking information says yes for IsClient/IsServer/IsAuthority.

    EDIT: As I've already registered and posted regarding this issue on the FlowCanvas forums, I'll reply and continue the conversation there with this again as to not have it take up too much room in this topic ^^;
     
    Last edited: May 31, 2016
  10. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hey,
    I've replied to you post in the FlowCanvas forums.
    Let me know. Thanks :)
     
    SwiftIllusion likes this.
  11. PilotBlues

    PilotBlues

    Joined:
    Jun 1, 2016
    Posts:
    2
    Hi there,

    Bought the tool recently and have been greatly enjoying it since!
    I'm running into a small problem and wasn't able to find a way to do what I'm trying in the documentation:

    I'm trying to use FlowCanvas with another asset that I've bought from the store. I've added the class of the new asset using the 'Add Type' menu, and I can access all of the functionality just fine. The asset requires a method to be called in order to function, and I'm having trouble finding a way to do so in FlowCanvas:

    e.g.
    1. On the 'void start ()' method the asset needs to assign a few variables. I used the 'on awake' event for this.
    2. Once the asset is finished initializing, it will call a 'void OnReadyToPlay ()' method, where I'll need to add further code.

    Am I right to assume that I somehow need to have this method converted into a FlowCanvas event? How would I go about implementing this? Let me know if I can provide any further info!

    Any help is greatly appreciated!
     
  12. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hello and thanks for getting FlowCanvas! I'm glad you like it thus far :)

    Can you please provide more info as of where this 'OnReadyToPlay' method is called?
    If it is a message send to the gameobject, then what you can do is create a script to receive the message and then send an event to FlowCanvas script to be used along with a "Custom Event" node. For example:
    Code (CSharp):
    1. using FlowCanvas;
    2.  
    3. public class Example : MonoBehaviour{
    4.  
    5.     public FlowScriptController controller;
    6.  
    7.     void OnReadyToPlay(){
    8.         controller.SendEvent("OnReadyToPlay");
    9.     }
    10. }
    CustomEvent.png

    Unfortunately method calls can not be intercepted or "listened" to directly, because they are not really events like:
    Code (CSharp):
    1. public event Action onReadyToPlay;
    If the asset actually provides events such as the above, then it would be easier to listen to that event with the "Code Event" node and without the need to create the intermediate "bridge" script.

    Let me know if the above work for you, or if you want to provide any further info on how the asset works or where the method is called.

    Thanks!
     
  13. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
    hey, i am using flow canvas now pretty often. still a great tool! :)
    i just noticed that the right click menu (right click on the blank canvas) is pretty much lagging. i think it takes half a second to appear. is there anything i can do about it or is this a already known issue?

    also. more a question to the community:
    has someone tried rewired with flow canvas? haven't tried it yet but iam curious how to set up rewired a input node in flowcanvas
     
    Last edited: Jun 3, 2016
  14. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Great to hear :)
    Yes, the right click taking a long to load up the menu is now fixed for the next version pending review. For now, please disable "Show Node Help" in the "Prefs" of the editor to fix this slow response until new version is live.
    I can't comment on Rewired since I haven' really used it. Maybe someone else has though :)

    Cheers!
     
  15. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
    Ah, cool. Wanted to suggest the same :D
    Will the right click menu still be there?
     
  16. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Yes of course :)
     
    Der_Kevin likes this.
  17. Rixtter

    Rixtter

    Joined:
    Mar 31, 2014
    Posts:
    244
    I like that "pending review" quote :) I hope you managed to squeeze in the memory issue fix, or at least made some progress... too many folk getting hung up on that...
     
    Last edited: Jun 3, 2016
  18. IFL

    IFL

    Joined:
    Apr 13, 2013
    Posts:
    408
    @nuverian - If you're desperate for feature ideas, group grid-snapping would be neat. It's not important though - it's just slightly annoying when rearranging graphs.
     
  19. iamsam

    iamsam

    Joined:
    Dec 22, 2013
    Posts:
    233
    @nuverian and others, how do you create a UI Text component as a blackboard variable (the only ones I found were button and slider). I would like to create a private "Text" variable which is assigned on Start by using the get component method. Has anyone tried this?
     
  20. IFL

    IFL

    Joined:
    Apr 13, 2013
    Posts:
    408
    @iamsam
    Preferred Types window. After you open the sub-menu "UnityEngine" from the Classes list, press the up arrow until it rolls around to the bottom where more sub-menus exist. Then UI, then Text. Is that what you're looking for?
    FC_iamsam_02.jpg FC_iamsam_01.jpg

    @nuverian - It would be kind of nice to have a searchable list in the Preferred Types window.
     
    nuverian likes this.
  21. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    There's been "some" progress on that, but more on other parts. Which "many people" are you referring to though?

    I will add this to the TODO list after the more important ones :). Thanks for the suggestion.

    Like @IFL mentioned, whenever you want to work with a type that is not in the lists, you can simply add it in the Preferred Types Editor :)

    The new version pending review and soon to be live, now indeed has a search field in the Preferred Types window :)
     
    IFL likes this.
  22. broncolyrix

    broncolyrix

    Joined:
    Jun 6, 2016
    Posts:
    5
    Can I use Playmaker with this asset?
     
  23. iamsam

    iamsam

    Joined:
    Dec 22, 2013
    Posts:
    233
    Thanks @IFL and @nuverian That was exactly what I was looking for. Somehow I missed those classes as they were around the taskbar on windows and its difficult to choose those items. Looking forward to the update so that we can search for those classes directly :).
     
    nuverian likes this.
  24. code-blep

    code-blep

    Joined:
    Oct 1, 2010
    Posts:
    308
    Sorry been super busy! Yep, spot on @IFL , and thanks for the response @nuverian. great news as always ;)
     
    nuverian likes this.
  25. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hello,
    Generally speaking, you can use FlowCanvas with any asset since it's an open-ended visual scripting system. So playmaker makes no exception at all. Before I say a big "yes" though, it would be great if you want to clarify what you mean by "use with playmaker", or what you want to achieve by using FlowCanvas with playmaker.

    Thanks.
     
  26. MrIconic

    MrIconic

    Joined:
    Apr 5, 2013
    Posts:
    239
    I'm a different person but is there any extension/plug-in for Playmaker that will allow me to Nest FlowCanvas in a Playmaker FSM?

    Allowing me essentially to call a (FlowCanvas) canvas from Playmaker that waits for a response.

    ---- Or can FlowCanvas only send events/call to Playmaker?


    Playmaker ----(Wait for Completion) ----> FlowCanvas -----(Response Event / Resume FSM)------> Playmaker


    Edit: The reason I use Playmaker over NodeCanvas is because it feels much more user friendly to do similar things for various reasons.
     
  27. nuverian

    nuverian

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

    Having true nested flowScripts in playmaker FSMs the same way as in NodeCanvas FSMs is simply not possible since playmaker is a whole different framework, unless playmaker developers want to create such an integration which I doubt they would want to. So, one thing possible is having an action that enables/disables a FlowScriptController (not a flowscript itself like in NodeCanvas) and fire an event when the assigned flowscript Finish in success or failure with the 'Finish' flowscript node. Here is the playmaker action for you:

    Code (CSharp):
    1. using FlowCanvas;
    2.  
    3. namespace HutongGames.PlayMaker.Actions{
    4.  
    5.     [ActionCategory("FlowCanvas")]
    6.     [Tooltip("Execute a FlowCanvas flowScript")]
    7.     public class ExecuteFlowScript : FsmStateAction {
    8.  
    9.         [RequiredField]
    10.         [Tooltip("The FlowScriptController to execute")]
    11.         public FlowScriptController controller;
    12.        
    13.         [Tooltip("Called when the FlowScript is finished in Success")]
    14.         public FsmEvent finishEventSuccess;
    15.        
    16.         [Tooltip("Called when the FlowScript is finished in Failure")]
    17.         public FsmEvent finishEventFailure;
    18.  
    19.         public override void Reset(){
    20.             controller = null;
    21.         }
    22.  
    23.         public override void OnEnter(){
    24.             controller.StartBehaviour(OnGraphFinished);
    25.         }
    26.  
    27.         void OnGraphFinished(bool success){
    28.             Finish();
    29.             Fsm.Event(success? finishEventSuccess : finishEventFailure );
    30.         }
    31.  
    32.         public override void OnExit(){
    33.             if (controller.isRunning){
    34.                 controller.StopBehaviour();
    35.             }
    36.         }
    37.     }
    38. }

    It is of course nowhere close as using FlowScript State in NC FSM, which by the way it would be great if you want to share those various things that you feel are more user friendly.

    Cheers.
     
  28. broncolyrix

    broncolyrix

    Joined:
    Jun 6, 2016
    Posts:
    5
    this answers me too thanks
     
  29. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
    heyhey!
    i want to convert this snippet:
    Code (CSharp):
    1.  
    2.     void OnTriggerEnter(Collider collision)
    3.     {
    4.         if(collision.gameObject.name == "DribbleCollider")
    5.         {
    6.                  ControllingFeet = collision.transform;
    7.  
    to a flow script. i already found the on trigger node, but how do i move on now?
    how can i get the if part (also with gameobject.Tag) working? i think somehow woth a switch condition maybe?
    and how can i set a variable based on a entered object (the ControllingFeet for example?)

    another thing iam trying to understand is comparison. i want to simple check if the rotation of a object is between 20° and 45° if yes, true, if no, false
    so i think also witht the switch condition node, right? and in the condition slot comes a AND. but what should be in A and B then?

    also another question/idea. i realy like the actions of flow canvas. i use them a lot. for example get nearest target. would be nice if some of the actions would also make it into flow canvas :)
     
    Last edited: Jun 8, 2016
  30. nuverian

    nuverian

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

    Here is how you can do that:
    Method1.png

    You can do the same for tag, but there exists a special node named Switch Tag which is easier and requires less nodes for checking an objects tag:
    Method2.png

    Let me know if this works for you.

    By the way, you can use all existing NodeCanvas actions and conditions already within FlowCanvas scripts. Simply download the "Task Nodes" extension from the FlowCanvas downloads section. This will add 2 new nodes named Task Action and Task Condition, which can be assigned any action/condition task respectively. Let me know if that is what you were after :)

    Cheers!
     
  31. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
    hey, thanks!
    the trigger stuff works perfect! thank you very much! did you saw my second question? i edited the post i think when you answered :oops:

    i downloaded the Task nodes but can not find them in FC. oh , i wrote " i realy like the actions of flow canvas" but i mean node canvas. so are the task nodes for FC or NC. iam confused now :D
     
  32. IFL

    IFL

    Joined:
    Apr 13, 2013
    Posts:
    408
    @nuverian - The update is live, and it's awesome!
     
  33. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    You are welcome.
    Indeed I missed your edit. Here is how AND should be connected for what you asked:
    AND.png

    Regarding the Task Nodes, I understood you meant NodeCanvas actions instead of FlowCanvas :)
    So, in FlowCanvas there should be 2 new nodes in the context menu when adding new nodes. "Task Action" and "Task Condition". These are the first 2 nodes in the menu list. When you add Task Action for example, you will be able to "Assign an Action Task" like the "Say" action in the image bellow:
    Task Action.png
     
    IFL likes this.
  34. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Great! Thanks a lot! I'm very glad you like the new version!
     
  35. MrIconic

    MrIconic

    Joined:
    Apr 5, 2013
    Posts:
    239
    Testing it now.

    Going to PM you how I feel there are some differences that I personally like. Since it's not really something that's outside of an opinion and shouldn't sway one's opinion of who or what asset to purchase.
     
  36. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
    thanks again. i was not soo far away from it :D flowcanvas_xyz.gif

    but as you also can see in the gif above, the extensions are not in the menu...
    edit: oh man, iam feeling stupid. i had another instance of unity open. so it got imported there. thats why i couldnt saw it. thanks for your patient :D

    now they are there in there and working perfect!
     
    nuverian likes this.
  37. MrIconic

    MrIconic

    Joined:
    Apr 5, 2013
    Posts:
    239
    It works. Thanks :)
     
    nuverian likes this.
  38. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
    some little feedback for the search function:
    so i wanted to reproduce your shot. and searched for ">" and "<" but couldnt find it. so i used the context menu to get the > and <
    also. i searched for "get euler" which didnt gave me any result. but "get_euler" did.
    so i think you know what i wanna try to explain :D

    edit: i just updated to the newest FC version and got some more feedback :)
    1.) when i updated the integration packs where broken (NC>Nested FC and so on) and gave some errors. somehow a window like the dottweem window would be great to always download the newest versions instead always have to go to your website :) or as a temp workaround just ad them as unitypackage in FC. that would be great :)
    2. the new right klick window. is faster, yes. but huuuge :D
    i am working on a 15" laptop and the old one was nice and compact. i liked the small one when i did a right click.
    for detailed stuff i always used the space key. or when i didnt knew where something is located. also the need to klick on a category is pretty much slowing down my workflow now. before it was just hovering and the next category appeared.

    also... for the future... a nice feature would be an external "Ad FC Node" Window just like external NC window
     
    Last edited: Jun 9, 2016
  39. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
    heyhey, i wanted to do a bouncer, that bounces out when a chracter enters a trigger. looks ike this at the moment: ezgif-1376277111.gif

    the flow for this is:
    footbrawl_pinball_flow.gif

    but how can i reset the bouncer back to "normal" after he came out?
     
    nuverian likes this.
  40. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hey,
    I will see in improving that part of the search, yes.
    An in editor window for downloads and updates is already in the works, yes. :_)
    There is a new preference option if you want to use normal menus (old way) instead of the big browser. Please toggle off the "Use Node Browser" in the "Prefs" of the editor window. I also prefer the small one by the way, but some people prefer the complete one, thus the option is there :)

    If you use the DOTWeen - FlowCanvas extension nodes, you will be able to queue tweens one after the other:
    Tween.gif

    Let me know if that's what you are after.
    Cheers!
     
    Der_Kevin likes this.
  41. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
    great news :)
    didnt saw the new option in the prefs drop down, thanks :)
    with the dottween extension it also works perfect. thank you very much!
     
    nuverian likes this.
  42. IFL

    IFL

    Joined:
    Apr 13, 2013
    Posts:
    408
    @nuverian - More tiny feature ideas. As before, these are hugely non-important and mainly for convenience.
    1. "Duplicate Selected" on multiple nodes selects the new nodes (like when currently duplicating a single node). It can really be a cluster to separate the bunches. My work-around is Copy/Paste, but duplicate would be nice.
    2. Ctrl-D/Delete functionality for multiple-selected instead of having to right-click.
    3. Dummy node for variables or connection midpoint handles (one or many) to organize flows/connections better.
    4. Select new nodes upon creation. Afaik, this works great with circle-drag-create and single-duplicate, but it doesn't work for other ways that nodes are created (new node, BB/scene drag-in, paste). This might fix the "Duplicate Selected" idea above.
     
  43. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hey,
    Thanks for the suggestions and pointers.
    I've noted them all down to improve/fix in the next update :)
     
  44. Rixtter

    Rixtter

    Joined:
    Mar 31, 2014
    Posts:
    244
    Another small feature idea: the right mouse button. In other assets right-clicking takes you back one sub-menu at a time. Speeds up navigation.
     
    nuverian likes this.
  45. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
    heyhey, its me again :D
    iam currently trying to set an script "active" as long as i drag a object/ hold down the left mouse button over a object. the dragging is alredy done.
    i tried "Mouse pick". but that doesent work with holding down the mouse button? it just fires when i klick down. and doesent stay as long as i hold down?
    also, which node do i have to use to toggle a script/component active?
     
  46. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    --EDIT--

    Hey, So, after the mistake I did... :D
    You, you can use the event "Object/Mouse" along with a Flip Flop flow controller like in the example bellow to achieve what you are after, considering I understood the requirements correctly.
    Each time either mouse is down or up on the target object assigned in the event node, the FlipFlip node will... flip flop :).
    FlipFlop.png
    You can drag and drop the component you want in the canvas and select the "set_enabled" property to set it enable, or disabled. The property can be found under the subcategory "More" just like all other inherited properties.

    Let me know if the above example works for you, or if you were after something different.
    Thanks!
     
    Last edited: Jun 16, 2016
    Der_Kevin likes this.
  47. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
    Sorry to say but. The example is for nodecanvas? :D
     
  48. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Ooops! Maybe I need some more coffee. I've now edited the previous post. Let me know on that one. :)
     
    Der_Kevin likes this.
  49. Smokas

    Smokas

    Joined:
    Mar 7, 2016
    Posts:
    114
    Hi,

    Saw that FlowCanvas is on sale now. Two questions before buying:
    1.Does node input terminal support multiple connections?
    2. Is possible to export/import created flow?
     
  50. GamerPET

    GamerPET

    Joined:
    Dec 25, 2013
    Posts:
    370
    Whooo... look that's on sale today! :D

    @Smokas - I can't verify right now but from what I remember you can export/import flows. They are exported as a JSON or smth like that. If I remember correctly so don't relay on my info.
     
    nuverian likes this.