1. We've introduced thread tags, search within a thread and similar thread search. Read more here.
    Dismiss Notice
  2. Learn how you'll soon be able to publish your games to China in four simple steps with Xiaomi. Sign up now for early access.
    Dismiss Notice
  3. Get further faster with the Unity Plus Accelerator Pack, free for new Unity Plus subscribers for a limited time. Click here for more details.
    Dismiss Notice
  4. We've released our first Timeline Experimental Preview, our new tool for creating cutscenes and more! To check it out click here.
    Dismiss Notice
  5. Unity 5.5 is now released.
    Dismiss Notice
  6. Check out all the fixes for 5.5 in patch releases 1 & 2.
    Dismiss Notice
  7. Unity 5.6 beta is now available for download.
    Dismiss Notice

FlowCanvas - Visual Scripting Similar to Unreal Blueprints

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

  1. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    1,753
    FlowCanvas Cover.png


    FlowCanvas
    is a powerful visual scripting system to create and manipulate virtually any aspect of gameplay elements for your Unity games in a very similar fashion to Unreal Blueprints and Autodesk Stingray!

    FlowCanvas gives the full flexibility of concepts typically available only in code, through an intuitive visual node editor, empowering you to create things from quick prototypes, up to complete game mechanics, without writing a single line of actual code!

    Designers: Prototype, iterate and realize complete gameplay mechanics without coding, while learning how code works the fun way! If you are familiar with Unreal Blueprints, you will feel right at home!

    Programmers: Interface with your code at a higher level, creating decoupled systems and/or provide new self-contained nodes to designers with an easy and well documented API!

    By connecting Events, Flow Controllers, Actions and Functions together, you can create and manipulate things like:
    • Player Controls
    • Level Events
    • Gameplay Mechanics
    • User Interfaces
    • Player Interactions
    • and much more...

    Feature Highlights:
    • Work in a complete, intuitive Visual Node Editor with all expected features! (undo/redo, zoom in/out, copy/pasting, multi-selection, duplicating, comments, groups, JSON import/export and more...)
    • Visualy Debug flow execuction and value transfers at runtime!
    • Create custom Macro nodes, also through visual scripting and reuse them anywhere or share with others!
    • Live Edit FlowScripts in runtime.
    • Use any type of variables out of the box. (Classes, Structs, Enums, Lists, Interfaces..)
    • Use automatically generated nodes for all and any Unity functionality, your code and 3rd party APIs.
    • Work expresively due to intelligent, automatic Value Conversions and Casting!
    • Filter nodes with Port Type-Sensitive context menus.
    • Sync variables over the network using UNET.
    • Extend and create custom nodes with ease, even with support for Generic(T) nodes!
    • Leverage a seamless integration with NodeCanvas BehaviourTrees and FSMs!
    • Exceptional Performance! No allocations.
    • All Platfroms Supported!
    • Full C# Source Code included!!
    FlowCanvas is inspired by Unreal's Blueprints. It however does not generate scripts, but rather works directly in runtime without the need to recompile.


     
    Last edited: Feb 24, 2016
  2. bilke

    bilke

    Joined:
    Jul 13, 2012
    Posts:
    50
    Can't wait for the release! Looks awesome!
     
  3. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    1,753
    Hello.

    Thanks a lot! I am glad you like what you see :)
     
  4. sefou

    sefou

    Joined:
    Aug 30, 2011
    Posts:
    287
    Bookmark. ;)
     
  5. movra

    movra

    Joined:
    Feb 16, 2013
    Posts:
    548
  6. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,035
    I understand that Flow nodes are executed left to right, but Value nodes are executed right to left. Any reason for that?

    By the way, I can't wait to try out the final version :)
     
  7. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    1,753
    Cheers :)

    A FlowCanvas visual script is not actual code neither it generates code. As such it can not be diffed, no.
    This is not unreal blueprint per se. It's rather inspired by how blueprints work as far as creating the visual script :)

    Cheers!

    Hey elecman,

    First of, I want to thank you for the feedback and suggestions you have provided thus far. It was realy helpful :)

    To answer your question, Flow nodes, or rather Flow ports, are like you said executed one after the other very similar to how a program executes functions in order.
    On the other hand, Value Ports are not really executed. They are simply the parameters of those "functions". As such, only when a function is called, the parameter values of that function are "fetched" and "fed" to the function.
    If a Flow Port is never executed, the parameter Value Ports of that same node are never fetched, since they are not really needed.
    So, value ports (parameters) are not really executed. They are rather requested, and thus this forth and backwards "movement".

    I hope I managed to explain that with some clarity, but if not, let me know :)

    Cheers!
     
    Last edited: Apr 14, 2015
  8. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,389
    Oh I forgot to ask, but were you able to get 'Collapsing' working? In Unreal 4/Blueprints, there's the option to collapse your nodes to graphs/macros (thinking nesting) which is terribly useful. :D

    Thanks man!

    -Steven
     
  9. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    1,753
    Hey Steve :)

    There is the ability to create Macros and reuse them within different FlowScripts (or other macros). Double clicking a macro node opens the macro up inline (nested) with the ability to go back to the previous graph.
    Now, with that said, unfortunately automaticaly creating a macro out of a multiple node selection is not there yet. So right now the way to do this is to create a new empty macro, define the inputs/outputs and cut/paste the nodes you want in it.

    Of course, I know it's not the same or as convenient, thus automaticaly creating macros out of node selection is in the roadmap and will be there eventualy :)

    Cheers and thanks Steve!
     
    Last edited: Aug 1, 2015
  10. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    1,753
    Last edited: Apr 1, 2016
  11. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,035
    No problem. Glad to help :)

    Thanks for the explanation. It makes perfectly sense now. I think it would be worth putting that analogy in the manual.

    I can now also see how I can make it look like a bunch of function nodes are executed left to right, so it looks like an electrical circuit. This would be done by detecting a change on any of the inputs (using some sort of buffer node), and then requesting the final output if a change happens. However this will quickly become spaghetti in larger graphs, not to mention the repetitive work required. Would it be possible to have this "extra" functionality build in instead?

    About the "switch" function node we talked about before, this can be implemented this way (pseudo node code):

    switch.jpg
    Note: you can change "false" by "0" to make it work for a float or int too.
    Code (CSharp):
    1. //Classical electrical switch.
    2. bool SingleSwitch(bool input, bool switchPosition){
    3.  
    4.     //Switch closed, connecting input and output wire.
    5.     if(switchPosition == true){
    6.  
    7.         return input;
    8.     }
    9.  
    10.     //Switch open, breaking input and output wire connection.
    11.     else{
    12.  
    13.         return false;
    14.     }
    15. }
    16.  
    17. //Electrical switch with two outputs.
    18. void DualSwitch(out bool outputA, out bool outputB, bool input, bool switchPosition){
    19.  
    20.     //Switch connecting the input with output A.
    21.     if(switchPosition == true){
    22.  
    23.         outputA = input;
    24.         outputB = false;
    25.     }
    26.  
    27.     //Switch connecting the input with output B.
    28.     else{
    29.  
    30.         outputA = false;
    31.         outputB = input;
    32.     }
    33. }
    I read the new quick start guide and it is clear and well explained. A few small notes though:

    This sounds better: "Press Edit to open up the editor window."

    This sounds better: "Another thing worth mentioning about connecting Value Ports together, is that...".

    This sounds better: "As such, NodeCanvas documentation for the most part, is also valid for FlowCanvas".

    One last thing, I would call the blackboard context menu "Get blackboard" and "Set blackboard" instead of simply "GET" and "SET".

    Other than that, great work!
     
    Last edited: Apr 15, 2015
  12. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,389
    Are you considering having the different categories of node have their own color/shape? Clearly I'm comparing this to Blueprint, and over there I find being able to quickly locate an Input or Action for example, or differentiating between variable types very helpful.

    -Steven
     
  13. bilke

    bilke

    Joined:
    Jul 13, 2012
    Posts:
    50
    Will it be possible to execute flow scripts in editor (not in Play mode)?
     
  14. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    18,524
    Looks interesting. I found we didn't use nodecanvas in the end for AI because it was just too much, but this looks like a simpler and more direct way of working with nodes, which suits me more. I don't need the decision making to happen via nodes, but my code, and to just wire code up for artists and designers. So an artist might find it simpler and easier to choose from my own high level functions instead and make simplistic comparisons.
     
  15. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    1,753
    Hey, you are welcome.

    I went ahead and tried what you suggest. The result is a "Conditional Event" node, which takes one boolean input and has 2 flow outputs. When the boolean 'condition' input change, 'On True' or 'On False' is called once.
    Of course this node requires constant checking of the boolean input for changes and kind of breaks the rules of event nodes, but hey, it works. Is that what you mean?

    Conditional Event.png

    Regarding this, I've added a SwitchValue<T> Function node which returns either of the 2 input values based on an input boolean condition.

    SwitchValue.png
    As for the dual switch, it can't realy exists as a Function node. Basicaly, anything that has a return type of void, needs to be called, thus needs Flow Execution.
    Possibly the 'Switch Condition' can suffice.

    SwitchCondition.png

    Thanks, as well for the suggestions and corrections. I will put them to good use :)

    Cheers!

    Hey Steve,

    Right now input/output names are color coded based on the port type. I tried coloring the connection lines as well, but the colored lines all around, made it look quite confusing. I can redo and post an image if you like to elaborate.
    All the "Exec" ports (called Flow ports here) have this "►" triangle next to their name.
    There is also some color coding in the node titles based on their type, like for example Events are red, Flow Controllers are blue and the rest are light orange.

    Are you suggesting a different color for the node graphic itself, or some identification icon maybe?
    I am open to suggestions ;)

    Cheers!

    Hey,
    Right now it's not possible, but I can certainly look at this feature since it can be achieved.
    There could be some EditorUpdate event node, but of course it will require extra care on what the flowscript will actualy do.

    Thanks :)

    Hey there,

    I would personaly not promote this as an AI tool although it can be used so, up to some extend. I think NC and generaly speaking behaviour trees, are best suited for AI behaviour, where this being an event driven system, is best suited for reactions to player interactivity. At least that's my opinion.
    Of course, its a very broad system, can be used in many ways and you can extend it a lot. So as far as it suits your needs, it doesn't really matter :)

    Cheers!
     
  16. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,389
    I have to reply quickly but you have seen Blueprints coloring coding no? Just like that! :D

    Thanks Nuvi

    -Steven
     
  17. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,035
    Thanks for the new nodes. That should do the trick. The conditional event node idea looks great. It might not be event based, but it does add more flexibility. You could make a special note in the manual stating it is not event based. It shouldn't affect performance tough if a bool is used, or even with a float I think.
     
  18. ExtraAmmo

    ExtraAmmo

    Joined:
    Mar 12, 2015
    Posts:
    11
    I'm very eager to see what the price will be. This might be the only asset I buy.
     
  19. iviachupichu

    iviachupichu

    Joined:
    Feb 6, 2015
    Posts:
    28
    Glad to see this finally released. =D

    How well does it integrate with NodeCanvas? Is it possible to use a FlowCanvas graph as a NodeCanvas action?
     
  20. ABCompany

    ABCompany

    Joined:
    Aug 3, 2014
    Posts:
    3
    Where it was released?I´m watching this thing about a week but I can´t find it anywhere to buy.Do I need to buy NodeCanvas?
     
  21. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,035
    Not yet released. Any time now, it is already submitted to the Asset store.
     
  22. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    1,753
    Hey,
    Yes, I have seen it of course, but Im not trying to copy paste it's GUI, thus any more specific feedback would be great :)

    Cheers Steve.

    You are welcome. Yes the Conditional Event node gives some flexibility indeed and as you stated, with just a simple value connected there is really not much of a drop.

    If anyone comes up with node ideas, I will be more than happy to add them.

    Hey,
    The price right now and until early access period ends, is 50$ which is 40% off the final.
    I think thats a very fair price :)

    Cheers!

    Hey :)
    In this first release no, but very soon after, I will provide integration nodes for example to use a FlowScript as an FSM State, in the usual inline "nested" fashion. I am just holding of a while, for FC to become a bit more mature after people's feedback, which I am very eager to hear, before expanding in further directions.

    Cheers!

    Hey,
    Thanks for your interest. Like Elecman stated, it's sumbited and pending review right now. It's not yet live on the asset store. You don't need NodeCanvas, no. It's a standalone asset :)

    Thanks.
     
  23. ABCompany

    ABCompany

    Joined:
    Aug 3, 2014
    Posts:
    3
    Thanks for reply.I have another question - Does this asset come with some sample projects like UE4 has for blueprint?I mean like top-down,fps,tps...samples.
     
  24. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    1,753
    Hello,

    In this first release there are no samples included. I will add some samples later on though for sure :)
    Cheers!
     
  25. rocki

    rocki

    Joined:
    Aug 10, 2012
    Posts:
    1,256
    Very cool asset and idea.

    Is the run time feature working only when in the editor? Reason for asking is that I'm interested to create the nodes in game.
     
  26. sefou

    sefou

    Joined:
    Aug 30, 2011
    Posts:
    287
    damage, though it would be useful.
     
  27. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,389
    I sense a roadblock Nuvi!

    How goes it? :D

    -Steven
     
  28. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    1,753
    Hey, Thanks :)
    Visual editing nodes is only possible in the Unity editor, since the editor is using a lot of unity's editor only classes.
    Is that what you are asking?

    Thanks.

    Hey,
    I know. I will certainly add examples later on :)

    Hey Steve!
    It's been submited for about 8 days now and pending. It usualy takes as much for new assets to apear rather than updates :)

    Cheers!
     
  29. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,389
    Has it only been 8 days? Okay never mind! :D

    Thanks man

    -Steven
     
  30. Wylaryzel

    Wylaryzel

    Joined:
    Sep 13, 2013
    Posts:
    126
    Hiho.

    FlowCanvas is available in the asset store - yeah. Purchased & downloaded. After importation I got several errors which are more or less related as I have NodeCanvas already installed:

    Assets/NodeCanvas/Framework/_ParadoxNotion (shared)/Design/Attributes.cs(46,22): error CS0101: The namespace `ParadoxNotion.Design' already contains a definition for `LayerFieldAttribute'

    Using Unity 5.0.1p2. Are Flow & Node currently not play nicely together or do I have to set something?

    Thx
     
  31. vidjo

    vidjo

    Joined:
    Sep 8, 2013
    Posts:
    97
    Just curious, what are the pros/cons of NodeCanvas vs FlowCanvas?

    Would you use them together? How would you propose interacting them?
     
  32. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    1,753
    Hey,

    Yeah just saw it is now online :)
    Thanks a lot for the purchase.
    If you have NodeCanvas in the project, simply delete the folder "Framework" from within the "FlowCanvas" folder or from within the NodeCanvas folder. Within, the same scripts exist, which are the core node framework.

    Thanks!

    Hey there,

    There are not really pros and cons between these two, since they are totaly different tools for different tasks :)
    NodeCanvas contains Behaviour Trees, FSMs and Dialogue Trees systems.
    FlowCanvas contains FlowScripts system.

    In the very near future I will add integration nodes between one another.
    Once again, they are quite different systems :)

    Thanks!
     
  33. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,035
    Bought :)
     
  34. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    1,753
    Hey, Thanks a lot!
     
  35. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,035
    Is the full documentation available somewhere or is it just the quick start guide for now?
     
  36. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    1,753
    Hey,

    I am writing more extensive documentation which will be available online soon. I need to make some website changes and "house" all assets in a common place.
    Meanwhile, by all means please do ask any questions you may have here and I will be more than glad to answer them :)

    Thanks!
     
  37. Wylaryzel

    Wylaryzel

    Joined:
    Sep 13, 2013
    Posts:
    126
    Starting to test it :)

    Short question: In the quickstart there are displayed for e.g. a value for a value box or for example 'Cube' in the box for transform on page 9. How can I get those displayed? I don't see them (the big yellow identifiers)?

    Using 5.0.1p2 personal.

    Thx
     
  38. sballew7

    sballew7

    Joined:
    Sep 3, 2013
    Posts:
    50
    Looks cool. I really enjoyed Unreal's blueprint system, though it was largely because I didn't want to pick up C++. I do know C# well and don't really have issues with scripting, but I am interested in visual scripting for prototyping, or for when it seems like a good fit.

    Does FlowCanvas work well when combined with scripting? By this, I do not necessarily mean writing custom nodes, but more like mixing components together. For example, having my character motor component in plain C#, and having my player's attack logic done in FlowCanvas. The attacking may want to interact with the motor, say to slow movement down. Would this be done via the reflection aspect? Would I write a custom node that calls the motor?

    Thanks!
     
  39. Wylaryzel

    Wylaryzel

    Joined:
    Sep 13, 2013
    Posts:
    126
    Next question I have:

    Are there any actions available to search for childrens of an GameObject and return all of those childrens - or one by one?

    Are there any actions available to get / remove / insert / add values for Lists?

    Another question with regards to reflections:
    How can I access and change for example the text of an NGUI Label in the scene?
    How can I access and change a target transform of the AIPathAgent of the A*Pathfinder?
    Under reflections I can't find those 3rd Party frameworks.

    Maybe I need to get a hang on the structure and flow coming from UScript :)

    Thx in advance
    Wyl
     
    Last edited: May 1, 2015
  40. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    1,753
    Hey :)

    These nodes with the big identifiers, are variable nodes. If you add a variable node "Variables/GraphVariable(T)/" the value of the variable will show in the node. You can also drag and drop an object reference to create a variable for an object. Can you please confirm that?

    Thanks!


    Hello and thanks,

    Yes, this can be done :)
    Generaly speaking, if you want to interact from the flowscript with a component, this can be done by calling or getting/setting some of the components methods and properties via reflection nodes. Now, reflection is not simply an Invoke. It's heavily optimized and fast in runtime. Alternatively, you can of course write custom nodes if you want, but doing this via reflection nodes is great as well. I would personaly write a custom node only if it's something more than simply a function call or a property get/set.

    Now if you want to interact from your script with the flowscript, the most prominent ways would be to either send the flowscript an event, or get/set some of it's variables.
    Furthermore, there is a "Code Event" event node, which can subscribe to a c# event on one of your monobehaviours on the game object.

    I am definetely looking for more "interaction" ways for the future. All suggestions are very welcome :)
    If you have any other questions or need some clarifications on the subjects above, please let me know.

    Cheers!


    Hey,

    You can use the "For Each" node with a Transform value to iterate the transform's children.
    (This is possible because Transform is an IEnumerable)

    Foreach Transform.png

    Regarding lists, I have negleted adding specific actions for them, but you can certainly use reflection to do that. By dragging any value output port in the canvas, the context menu poped-up will first show a category for the reflected methods and properties of the type you draged. So in the case of the list, you will get a category including all methods/properties of type List<> like in the image. Within that category, Add, Remove, RemoveAt, Count etc will exist.

    ListContext.png

    But, to make this more streamlined, here are a couple of nodes List related.
    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using ParadoxNotion.Design;
    4.  
    5. namespace FlowCanvas.Nodes{
    6.  
    7.     [Category("Actions/Lists")]
    8.     public class ClearList : CallableFunctionNode<IList, IList>{
    9.         public override IList Invoke(IList list){
    10.             list.Clear();
    11.             return list;
    12.         }
    13.     }
    14.  
    15.     [Category("Actions/Lists")]
    16.     public class AddListItem<T> : CallableFunctionNode<List<T>, List<T>, T>{
    17.         public override List<T> Invoke(List<T> list, T item){
    18.             list.Add(item);
    19.             return list;
    20.         }
    21.     }
    22.  
    23.     [Category("Actions/Lists")]
    24.     public class InsertListItem<T> : CallableFunctionNode<List<T>, List<T>, int, T>{
    25.         public override List<T> Invoke(List<T> list, int index, T item){
    26.             list.Insert(index, item);
    27.             return list;
    28.         }
    29.     }
    30.  
    31.     [Category("Actions/Lists")]
    32.     public class RemoveListItem<T> : CallableFunctionNode<List<T>, List<T>, T>{
    33.         public override List<T> Invoke(List<T> list, T item){
    34.             list.Remove(item);
    35.             return list;
    36.         }
    37.     }
    38.  
    39.     [Category("Actions/Lists")]
    40.     public class RemoveListItemAt<T> : CallableFunctionNode<List<T>, List<T>, int>{
    41.         public override List<T> Invoke(List<T> list, int index){
    42.             list.RemoveAt(index);
    43.             return list;
    44.         }
    45.     }
    46.  
    47.     [Category("Functions/Lists")]
    48.     public class GetListItem<T> : PureFunctionNode<T, List<T>, int>{
    49.         public override T Invoke(List<T> list, int index){
    50.             try {return list[index];}
    51.             catch {return default(T);}
    52.         }
    53.     }
    54.  
    55.     [Category("Actions/Lists")]
    56.     public class SetListItem<T> : CallableFunctionNode<List<T>, List<T>, int, T>{
    57.         public override List<T> Invoke(List<T> list, int index, T item){
    58.             try { list[index] = item; return list; }
    59.             catch { return default(List<T>); }
    60.         }
    61.     }
    62. }
    You can put this code into a new .cs file and they will apear in the menu.
    ListNodes.png
    Regarding reflection. To keep the menu of available nodes cleaner, instead of showing nodes for every single type in there, only the most common ones are shown. But this does not stop you from using other types of course :)

    You can drag and drop a component from the inspector into the editor canvas and it will pop a menu where you are able to either add it as a variable, or of course call get/set some of it's functions or properties. So for example you can drag an NGUI Label in there and select Set Text under Actions category.
    Here is an animated example (with camera)

    DragDrop.gif

    Let me know if this clarifies your questions or probably you have more :)

    Cheers and thanks!
     
    Last edited: Aug 1, 2015
    Wylaryzel likes this.
  41. Wylaryzel

    Wylaryzel

    Joined:
    Sep 13, 2013
    Posts:
    126
    Thx for the intense reply :)

    Getting more and more a hang of the flow (even if it is a bit different to what I'm used to).

    The drag&drop functionality is very cool. Time for a manual :)

    The forEach worked great as well - I didn't think even to use it that way.

    As for the colors and showing the values itself here is a pic how it look like in the u5 personal edition:
    upload_2015-5-1_13-13-21.png

    As you can see - it misses the colors for the actions/etc/events and even don't provide the value or link to the variable for the value.

    Another question from my side - as I'm using NGUI how can I integrate the OnClick/OnPress etc functions from them?
    Do I have to make an custom node-event?

    Some ideas for enhancements for the UI itself:
    * Would it be possible to add a dockable window with search function instead of a right-click to add a new action/event/function/etc?
    * When pressing play in the editor (using full screen) and end it, the canvas loose its focus even the gameobject with a flowcanvas is still selected (the window states please select a graph owner).
    * In the flow script controller component under 'on enable' and 'on disable' it refers to behaviors - most probably as it use the same core framework or?
    * if selecting multiple actions the hitting delete key for deleting does nothing. Right-click on any action and hitting the delete key deletes only the last selected action.
    * if selecting multiple actions the STRG-D/Ctrl-D does nothing. Right-click any action and hitting the duplicate key (STRG-D/Ctrl-D) only duplicates the last selected action.

    Thx in advance
    Wyl
     
  42. Wylaryzel

    Wylaryzel

    Joined:
    Sep 13, 2013
    Posts:
    126
    Testing some further :)

    When using a Transform-Var of the gameobject, I can iterate with the for-each loop. If I choose GameObject as value input it denies connecting from the value of the gameobject to the value of the for each node.

    Furthermore, I included the cs.file you provided (many thanks for that :) ). According tot he 'Current'-Output of the for-each node, it provides an object. If I create a Object<List> it denies to connect the current-output with the '#Item' input of the AddList node:
    upload_2015-5-1_14-0-59.png

    I tried it with an GameObject List as well, but it doesn't work again.

    Thx for help :)

    In general, I really like the workflow and even testing it for only a few hours it feels very natural :) But I may still needs to get trained :)

    BR
    Wyl
     
  43. sballew7

    sballew7

    Joined:
    Sep 3, 2013
    Posts:
    50
    I'm likely going to pick this up tonight.

    How do comments work? It it like Blueprints where I can comment a box section?

    Edit: One more question. The quickstart mentions adding a Flow Script Controller component to a GameObject. My understanding is this controller is provided a FlowScript to execute. Am I able to add multiple Flow Script Controllers to a single GameObject?

    For example, if I want to implement specific components via Flow Scripts (such as a "movement" component and an "attack" component), can I add both of these to a single object? Is that done by adding multiple Flow Script Controllers?

    Lastly, the "Preferred Types Editor"... When I create new classes, will I need to keep updating thi list for them to show up in my type list? Or can I just specify my namespace prefix (almost like a regex) and have it always include my types?

    Thanks!
     
    Last edited: May 1, 2015
  44. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    1,753
    Sorry for late replies.

    You are welcome :)

    The "tenchical" reason why ForEach works with a Transform value is that Transform is an IEnumerable and the non generic "ForEach" node takes an IEnumerable input value. It's a bit of a special case.

    Yeah, the personal/indie theme needs some further work. Sorry. I have also stated this in the description of the asset in the asset store page. There are numerous reasons why color coding doesn't work, but I will try and do my best in future version. Regarding the the Variable node not showing the name AT ALL in indie theme, to fix this temporary, please open up GetVariable.cs and change the property "name" at the top to look like this:
    public override string name{get {return value.ToString(); }}

    For events, there is a Code Event node, but this node works only for events of System.Action like:
    public event System.Action SomeEvent;

    For other delegate types, yes, you will have to create your own event node, or for an easier alternatevely, you can send an event to the FlowScript via the FlowScriptController and use the "Custom Event" node.
    Here is an example with UnityEvents and a Unity UI Button. If I remember correctly, NGUI has something similar.

    OnClick, call FlowScriptController.SendEvent, named "SomeEvent" for example.
    UnityEvent.png

    In FlowScript, use CustomEvent and wait for "SomeEvent" to be called
    CustomEvent.png

    Regarding your suggestions:

    * Would it be possible to add a dockable window with search function instead of a right-click to add a new action/event/function/etc?

    There is a more complete browser which you can open up with the back quote key " ` " (above TAB, left of 1). It has a search bar, but it is not dockable. I will see if making dockable is an option :)

    * When pressing play in the editor (using full screen) and end it, the canvas loose its focus even the gameobject with a flowcanvas is still selected (the window states please select a graph owner).

    Oh, yeah. It seems that if "maximize on play" is selected and the editor is docked somewhere, it indeed loses focus. It is a bug. I will try to fix this. Thanks.

    * In the flow script controller component under 'on enable' and 'on disable' it refers to behaviors - most probably as it use the same core framework or?

    Yes, that is the reason, although the effect is the same. If you select "Do Nothing" OnEnable, then the FlowScript will not be enabled.

    * if selecting multiple actions the hitting delete key for deleting does nothing. Right-click on any action and hitting the delete key deletes only the last selected action.
    * if selecting multiple actions the STRG-D/Ctrl-D does nothing. Right-click any action and hitting the duplicate key (STRG-D/Ctrl-D) only duplicates the last selected action.


    When you have multiple nodes selected, you can right click any of them and Delete, Copy or Duplicate alltogether though the context menu poped up. Does this menu not show up for you?
    MultiSelectioMenu.png

    You realy stumbled upon a very special case with the Transform and the ForEach node here :)
    The ForEach "current" value is a System.Object type, while the "Add List Item" node you've added is for a UnityEngine.Object. Same name thus the confusion. (I will have to differentiate the names though, my bad)

    I could tell you some ways to go about it (and explain some more techincal details about this), but since I am not exactly sure what you are after and to avoid confusion, here is a node you can use (and I will include in future), which returns all child transforms of a given parent transform.

    Code (CSharp):
    1.     [Category("Functions/Utility")]
    2.     public class GetChildTransforms : PureFunctionNode<IEnumerable<Transform>, Transform>{
    3.         public override IEnumerable<Transform> Invoke(Transform parent){
    4.             return parent.transform.Cast<Transform>();
    5.         }
    6.     }
    You can then iterate it if you want with a "ForEach<Transform>" node. In this cast the "Current" output value will be of type Transform instead of object like in the case when using the simple "ForEach" node.

    ForEachTransform.png

    Let me know if this covers the case :)

    Thanks a lot!

    Hey there,

    You can create canvas group rectangles and give them like shown in the first image of the first post.
    If you mean creating a box full of actual text this is not there yet, but will be eventualy :)

    Yes, the FlowScriptController exists to control a FlowScript. You can have any number of FlowScriptControllers on the same game object. They also all share the same variables, since variables are stored on a different Component on the game object (Blackboard).
    At first I was thinking of having only one such component and have it contain all different flowscripts, but I decided to go this way, for now at least :)

    Regarding the "Prefered Types", the types added there, are purely an editor menus thing. Those types added there are the ones that will show under the "Reflected" category for example (to choose a method of property), to save some clutter in the menus. Regardless of the types added in there, all types can be used if that's what you mean. Again, it's an editor menus convenience thing.
    So, yeah, if you need all your new classes to be shown in the menus, you need to add them there.
    Of course, the idea of defining a namespace as well and have all types of that namespace added automaticaly, is a nice one :)

    Cheers and thanks!
     
    Last edited: Aug 1, 2015
  45. Wylaryzel

    Wylaryzel

    Joined:
    Sep 13, 2013
    Posts:
    126
    First of all, thx again for the answer.

    Some feedback on your answers:
    Yes, I see the menu on right click, I only wanted to point to the behavoir with using the key short cuts. Its irritating if they don't behave similar (especially the last node selection I mentioned)

    Nope, nothing comes up. May it has to do that I'm using a keyboard with a german layout. At that position above TAB there is "^".

    How do I apply such group of rectangles?

    Thanks for the explanation - I assumed something like that already. Currently the System.Object is not available under Variable -> System. There are only Int, Float, String, Bool?
    Additionally, I would expect that the value of that node would be of the same type as the values feeding? Why is the outcome an System.Object if I feed with a list of transforms? I'm not to much of an coder :)

    I tried it with NGui, but as soon as I select the FlowScriptController.SendEvent I get the following error:
    "Could not find method 'SendEvent' on FlowCanvas.FlowScriptController
    UnityEngine.Debug:LogError(Object, Object)."



    With regards to the 'filling of lists' I think I found a current solution:
    upload_2015-5-2_13-49-25.png
    As I'm in the testing phase I think its ok. If I would need such a function more often I may would create a macro or an own generic node :) By the way - when do you think you will have a documentation available? Or is it the same as for NodeCanvas?

    Additionally - as I didn't found something. Is it possible to instantiate a prefab?

    On the Asset Store page currently Android and iOS are not mentioned. Is it as it isn't tested or do you use some functions which prevents FlowCanvas on deployment on that systems? The reason I ask is because NodeCanvas doesn't have such a limitation:)


    Thx again for your time
     
  46. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    1,753
    Hey,

    Yeah, keyboard commands for multiple nodes will be fixed. Thanks for that :)

    Regarding the browser, does your keyboard has a backquote key? ( ` )
    I can change the shortcut to something more common or add it as a toolbar button. I just borrowed that shortcut from the Nuke node editor which I like quite a lot.

    To create a canvas group, you make a drag rectangle selection in the canvas and then hold down control and release the mouse. There is also a label at the mouse position when making a drag selection, reading "+ control for Canvas Group". Let me know if you have trouble with that.
    CanvasGroup.gif

    The types of the nodes are explicitely declared. I mean, the node does not know what input it is fed and thus alter the output. So, the normal ForEach node takes a value input of IEnumerable and has a value output of System.Object, regardless what it is fed in the IEnumerable port.

    Regarding NGUI, does it have a dropdown menu where you select a method to call and when you select it you get that error about not finding the method? I will need to "install" NGUI and check what you mean here :)

    There are certainly many solutions to one thing. Yours is fine, but of course it depends on what you want to do with these child transforms. Of course, like you said, you can always create custom nodes for reusable stuff and by all means thats the way to go. I mean it's far better and more managable to work with fewer high level nodes specific to your needs or game, instead of a lot of low level ones.

    Regarding instantiation, you can instantiate an object with the Unity's function ( "Functions/Object/Instantiate" ) :)

    Regarding platforms, Android is supported (I forgot to add that in the description). iOS is not and unfortunately probably never will, due to how FlowScripts specificaly work.

    Further documentation, is in the writing. I really expect it done within the week :)

    If you have any more questions, by all means do ask and I will be glad to answer them.
    Thanks a lot and cheers!
     
    Wylaryzel likes this.
  47. Dbone

    Dbone

    Joined:
    Mar 10, 2014
    Posts:
    56
    Wow, I'm impressed Nuverian. You're a busy guy!

    I'll probably be picking this up soon since I've been watching Uscript for a while and this seems to cover a lot of the same bases.
    I'm a huge fan of Nodecanvas so integration is an important thing to me. I assume at the very least Blackboard variables will be synced and flowscripts could be added as nested nodes in a BT?

    I'm looking at Flowcanvas among other things as a way to create actions for Nodecanvas. So being able to make Flowscripts available to NodeCanvas' actions list would be awesome. Being able to save them and import from other projects would be great too, that way I could build up a bank of useful Flowscripts over time and not need to bug my code savvy friends (you included) to help me out with some custom actions.

    Also, i'd just like to cut Playmaker out of my projects, but the sheer amount of actions available make that impossible currently.

    I'm learning C# as fast as I can. FlowCanvas looks like a good middle step.
     
  48. Wylaryzel

    Wylaryzel

    Joined:
    Sep 13, 2013
    Posts:
    126
    Want to drop a short thank you for all the answers provided :)

    I'm currently digging deeper into the system and getting a hang of it. The more I try it, the more it feels very natural. In general I like the workflow.

    May over time you have the possibility to add additional custom nodes as shortcuts for some other use cases or to support the functionality of other assets. I think this would be a great feature (even if the would be possible via reflection).

    Thx again for the tool
    Wyl
     
  49. sledgeman

    sledgeman

    Joined:
    Jun 23, 2014
    Posts:
    97
    Can someone explain, what the exactly difference between nodecanvas in relation to flowcanvas? Are there any similarities? In which case do you choose one of them , or do you have to use both of them ?
     
  50. Wylaryzel

    Wylaryzel

    Joined:
    Sep 13, 2013
    Posts:
    126
    The scope of both tools are different:
    * NodeCanvas is a Statemachine/Behaviortree -> execution of actions based on the current state and move on to the next state
    * FlowCanvas is more in the direction of execution of action(s) and. It always has a start and an end. E.g. you receive an event or activate an trigger and based on this you open/close a door. Such cases can be also achieved with StateMachines (prominent example would be also playmaker) but I think its like shooting with cannons instead of a simple bullet.

    It really depends what you want to achieve and choose the best tool for it.

    BR
    Wyl
     
    nuverian likes this.