Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

FlowCanvas - Visual Scripting Similar to Unreal Blueprints

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

  1. sledgeman

    sledgeman

    Joined:
    Jun 23, 2014
    Posts:
    389
    Thank you for info & clarification :). Didn´t know that you can achieve with both the same result (nodeCanvas / FlowCanvas). As I understand flowCanvas would be more elegant in your example, than nodeCavas, right?
     
  2. Dbone

    Dbone

    Joined:
    Mar 10, 2014
    Posts:
    56
    NodeCanvas is Behaviour Trees and Finite State Machines, whereas FlowCanvas is much more similar to traditional scripting.
    Being a non-coder (well... almost) myself, here's my perhaps a little oversimplified understanding of the three approaches, BT, FSM, and actual Visual Scripting FROM A NON-CODER'S PERSPECTIVE:

    Technically BT and FSM are considered visual scripting, but in reality it's more arrangement than scripting IMHO.

    For the purposes of this write up, ACTIONS are blocks of C# code, represented in a node on a graph, and are made to accomplish a particular small task. Usually a single task.

    BT - Behaviour trees are a GROUPING of conditional actions that can run at the same time or independently. They react to changes (conditions) immediately and fire off actions as a change is detected. Any number of actions can be fired off simultaneously from one behaviour tree.

    FSM
    - Finite State machines are a SERIES of SOMETIMES conditional actions that run one after another. Actions are contained within "States" (another name for groups of actions) and only one state can run at a time. They most commonly are setup to switch between states after evaluating a variable. Eg: State 1 has an action that says: If boolean "A" is true, switch to state 2.

    There are great comparisons of the strengths and weaknesses of both of these methods that can be found with a simple google search, but to paraphrase pretty much all of them: they work great together. NodeCanvas also makes it extremely easy to use either, separately or together.

    BUT (there's always a but) both BT's and FSM's are reliant on pre-made actions. NodeCanvas comes with many useful actions, and also many ways to get around needing custom ones (google C# code Reflection) but sometimes you're just out of luck and something needs to be coded.

    Visual Scripting - You can do anything with plain scripting, but not all of us are that lucky (yet). FlowCanvas differs from just writing plain C# scripts in that it takes all the elements (functions, methods, etc) and makes them available on a graph to be wired up, basically giving you the power of scripting without needing to know all the finicky details about the structure and syntax. Without getting too detailed (actually...that might be all the detail I know...) you CAN create a BT and an FSM in FlowCanvas but the process would be more labour intensive and be more confusing visually as to what's supposed to happen when, simply because you would have to create the logic behind the BT or FSM as well as what it's supposed to be doing.

    For me, the real payoff of FlowCanvas is having good access to working with the code of OTHER ASSETS without being judged harshly by unforgiving compiler errors. I can't count how many times I've wanted to integrate two different assets and I just can't because my C# skills are...un-skillful. Usually the integration of two assets needs to happen in code and having specific actions to accomplish that is necessary.

    In summary: FlowCanvas can do nearly everything, but that power comes at a cost (added time, more knowledge needed, and a more complex graph) when you could use a BT or FSM instead with NodeCanvas. For me, that's 90% of the time, but it's that last 10% of cases that keeps my projects from completing while I wait for a custom action. FlowCanvas is a god-send, worth every penny, AND is getting me closer to understanding coding concepts without killing me with syntax.

    If I have said anything in error, someone please correct me and I'll gladly edit.
     
    Last edited: May 5, 2015
    Teila, Rixtter and nuverian like this.
  3. sledgeman

    sledgeman

    Joined:
    Jun 23, 2014
    Posts:
    389
    Ok, got it. Thank you.
     
  4. nuverian

    nuverian

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

    Thanks for your explanation of NodeCanvas / FlowCanvas and for your kind words :)

    Regarding integration between one another, blackboard variables are already "synced". If you have a FlowScriptController and a BehaviourTreeOwner on a gameobject, they will both use the same blackboard, which is the one on the gameobject.
    The next step, yes, would be to have nested Flowscript in BTs and FSMs :) I am working towards that direction now.
    Since FlowCanvas does not generate scripts, unfortunately I cant think of a way to create NC actions that show in the list, but I think nested nodes will cover for this part nicely.

    Also, sharing graphs between projects is possible, either by exporting the graph as an asset or in json format, and importing into the other project :)

    Thanks again Dbone!

    Hey,
    You are welcome and thanks! I am glad you like it :)
    Yes, of course I will provide more nodes in future updates. There are many updates to come, I asure you :)
    All suggestions and request for new nodes or features are more than welcome.

    Cheers!
     
  5. Dbone

    Dbone

    Joined:
    Mar 10, 2014
    Posts:
    56
    I had a great breakthrough with FlowCanvas yesterday and managed to script some things that have evaded me for months. What a fantastic tool. I left you a review as some small thanks.

    I was wondering if you plan on offering a version of the Playmaker nodes you provide for NC with FC? Not that I need them since I own NC already, but it could be a huge bonus to some people to be able to sync variables with the FC blackboard. Just a thought.
     
  6. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hey,
    Thanks a lot for the so much thorough review Dbone! I really appreciate it! :)
    Nice idea about PM. I will append it in the next version which I am working towards.

    Thanks a lot again!
    Cheers!
     
  7. Dbone

    Dbone

    Joined:
    Mar 10, 2014
    Posts:
    56
    So I can't access a the variable I'm trying to set through reflection and I'm not sure if I'm running up against a limitation in FlowCanvas, in C# reflection, or in my own understanding of how to use either.

    The variable is in a nested class. I can see it's parent class and I can add it as a type, and I can also see the nested class in the preferred types menu, but when I add the nested class as a type I cannot access anything from it (nothing in the actions or functions, and nothing from the add variable menu on the blackboard). Also, when I hit play the nested class disappears from the type menu.

    So far I have attacked the problem from many different angles, with no success. I have had no problems accessing any other classes, properties, and variables through FC reflection.

    Any ideas?
     
  8. nuverian

    nuverian

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

    Regarding the type added and then disapearing in the Preferred Types editor, it doesn't actualy disapear. It's just that the list get's reordered alphabeticaly, so the type is removed from the end of the list where it's added initialy and thus I think it seems like disapearing :). Can you please confirm that the type is still in the list but in it's alphabetical order?

    Now, regarding what's accessible through reflection and the reason why the type might not be showing under Actions/Functions menus, is that only methods and properties are accessible. Fields are not accessible for peformance.
    Is this the case, where the class you are refering to, does not have any public properties or methods? If so, that is also the reasons it doesn't show up in the menus, since (at least now) there is nothing that can be accessed. It should still show to be added as a Blackboard variable though in any case.

    Can you please confirm and elaborate on the above?

    Thanks!
     
  9. Dbone

    Dbone

    Joined:
    Mar 10, 2014
    Posts:
    56
    Hi Nuverian,

    I did more tests. I can confirm without a doubt that I can see the type to add in the list when I try to add a new type. Then I choose it, it adds to the list and says configuration saved. Then if I close and reopen the Preferred Types window or press play the added type is gone, definitely not just alphabetized.
    When I leave the window open (so I can still see the type) I cannot add anything to the graph OR blackboard that derives from that type.

    The class I am trying to access is nested inside another class. It is a public class, and has 6 public fields in it only: 3 floats, 2 quaternions, 1 vector3. The last thing in that class is listed as public, has the exact same name as the class, and MonoDevelop tells me it's a constructor.

    I wish I could send you the script but it's not my code. It's part of Ootii's awesome Bone Controller asset.

    One curious thing is that I started a new project to test and only imported FlowCanvas and Bone Controller. When I opened the Preferred Types window, the types that I've added in my other project are still there, is this normal that the Preferred Types are not at default and unique for every project? I'm hesitant to reset it to the defaults in the test project because I don't want to affect my good project.

    Windows 7 64bit
    Unity 5.0.1 personal (free)
     
    Last edited: May 12, 2015
  10. nuverian

    nuverian

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

    The problem here is that the class does not have any public properties or methods and FC can only create reflected based nodes from properties and methods of a class currently, and not from it's fields. It doesn't matter whether or not it's a nested class.
    So the feature you are missing here, is the ability to work with reflected fields as well :)
    The reasons this is currently not supported is due to the performance of using fields with reflection, but I can certainly allow this in future version regardless.

    I will note this down :)

    --EDIT--
    The prefered types list is stored in Unity's Editor Prefs, which are common in all projects. This might be a good or not a good thing depending on the situation, but missing types will of course not load back in a project where they do not exist.
     
    Last edited: May 12, 2015
  11. Dbone

    Dbone

    Joined:
    Mar 10, 2014
    Posts:
    56
    Ah, I see. Thanks for the quick response.

    I guess I don't understand why I can set most fields with Get and Set commands that FC has no problem reflecting but these fields are not accessible by Get and Set.
    That would be great if the option was available to reflect fields, since in my case, and I'm sure some others too, an occasional performance hit is worth being able to implement a feature you wouldn't be able to otherwise. I don't think I'd be worried about the performance hit of directly reflecting a field in this case, since it will only be a single field being reflected for the entire project and won't change regularly. I'll definitely think twice if it grinds my frame rate to a halt though :)

    I don't know how difficult popup warnings are to implement, but I have no idea how expensive different reflection actions are, and if there are some that can be VERY expensive I wouldn't mind being warned. I know reflection itself has a performance cost so in general I'm trying to get and cache all my types or lists on the blackboard with the OnEnable event. Then anything that needs to run in OnUpdate runs from a variable node that grabs it from the blackboard rather than reflecting the type every frame. This seems like a good practice anyway, correct me if I'm wrong.:oops:

    Also, do have any insight into why the Preferred types list carried over from one project into a totally new one?
     
  12. Dbone

    Dbone

    Joined:
    Mar 10, 2014
    Posts:
    56
    I understand now. I spent some time on it and managed to add Get/Set methods to the fields in the nested class. FC had no problem reflecting the methods. Unfortunately, I can't get FC to find and store the particular instance of that nested class that I want to affect. I believe this is just because of how the functions were created in Bone Controller though.

    As a fix, I spoke with Ootii, and he gave me a code snippet that adds two settable variables to the parent class that FC can see and interact with. All is right with the world again.:)

    Now that I understand a little more about refllection, and can see how potentially easy it is to add methods that can be set rather than reflect fields directly, I'll leave it to you to decide if you want to add that functionality. I wouldn't want you to go to the trouble just to have a bunch of inexperienced people (like myself) reflect a whole bunch of fields, drive their FPS into the ground, and leave bad reviews about FC based on performance.

    I suppose another option would be to be able to enable field reflection from the settings menu, and explain there about the performance hit.

    Anyway, thank you as usual for the great support, and congratulations on hitting 100 reviews and still being 5 stars with NodeCanvas. It takes a solid product to make it to 100 reviews, FlowCanvas is destined for the same!
     
  13. nuverian

    nuverian

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

    Thanks a lot for your kind words :)
    It was very kind of Ooti to help through as well.

    Don't be harsh with yourself. Your observations really help in understanding what might be lacking and what not :)
    So, I think I will go with adding support for fields so that it's more convenient, even at the sacrifice of some performance which will though be noted within the node.
    I will try adding this in the next upcomming update.

    Thanks again for all your feedback, observations and suggestions Dbone.
    If you need anything, don't hesitate to ask :)

    Cheers!
     
  14. Dbone

    Dbone

    Joined:
    Mar 10, 2014
    Posts:
    56
    Thanks for the encouragement! Since I'm working on the core logic of my current project it's really handy to have such good support. I'm hoping to work out most of the workflow bugs now so that the next time around it'll be a smoother process.

    So I'm getting an a few error messages with FlowCanvas now because of a little "cheat" I figured out to get some node input/outputs to match up. The scripts work, but they throw some errors.

    I attached a screencap but I'll walk you through it anyway:

    - The end result of this script is to call a function called Set RightCurl
    - Set RightCurl is part of the FingerBoneMotor class which is a Type of IKMotor
    - I start off by using the Get Motor function to get the instance of the FingerPoseMotor that I need. The Get Motor node allows me to choose the specific type with a drop down.
    - The problem begins because the output of the Get Motor node is the generic type IKMotor, but the input of Set RightCurl is the specific FingerPoseMotor type and they do not match up even though I know they will be the same.
    - To save the output of Get Motor to the blackboard, FC creates a generic Type variable called IKMotor, at runtime though it will change to the specific Type FingerPoseMotor. Unfortunately though, runtime is the only time the specific Type is returned anywhere, so I can't make a Get Variable node that will have a FingerPoseMotor output on it from that BB variable, which is what I need to feed into Set RightCurl.
    - The "cheat" I found is to make a variable on the BB for IKMotor AND a separate one for FingerPoseMotor. Then I make a Set Variable node for the IKMotor one. Inside that node I change the variable it points to to the FingerPoseMotor one and then connect it to the Get Motor output since the node connection STILL says IKMotor. This way Get Motor now saves its output to the specific FPM variable.
    - Now I can make a Set Variable node for the FPM variable and the node has the correct output type to feed into Set RightCurl.

    As I said, the script works perfectly, but it throws this error:

    error message.png

    Thoughts?

    FC cheat.gif
     
  15. BYD

    BYD

    Joined:
    Jan 26, 2015
    Posts:
    24
    I really like this, and I'm eager to buy this tool.
    But since no code is compiled I'm not sure how performant it is at runtime...
    Will there be an option to compile the code?
     
  16. BYD

    BYD

    Joined:
    Jan 26, 2015
    Posts:
    24
    Nevermind, already bought this :p
    But I think you should define the namespace when using the JSON.Deserialize and Serialize methods.
    In my project there were already some JSON implementations from other assets which confused the compiler and he did not find a definition for the function.
    I fixed it by replacing 'JSON.Serialize' with 'ParadoxNotion.Serialization.JSON.Serialize' and
    'JSON.Deserialize' with 'ParadoxNotion.Serialization.JSON.Deserialize'
     
  17. nuverian

    nuverian

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

    Sorry for the late reply.
    Hm..
    Yeah. If you were to connect a child class to a base class it would be possible, but doing the opposite, connecting an output of base class to a child class (downcasting) is not possible because the cast might not be valid.

    Thinking of this and since the foundation of automatic casting/convertions exist already, in the next update it will be possible to do a downcast like this, thus be able to connect IKMotor to FingerPoseMotor like you originaly expected to do :)
    Of course if the cast is not valid, you will get an error and the value will be null.
    So the problem you are encountering here is downcasting an object. I would personaly stay away from the hack as it may lead up to more problems and confusion that it may solve :)

    You can actually already do this casting manualy by using the CastTo<T> node.
    To do this, add a CastTo<FingerPoseMotor> between the return value of GetMotor and the SetRightCurl, thus casting whatever GetMotor returns (IKMotor) to FingerPoseMotor that the SetRightCurl needs.
    The CastTo is found under "Utilities/Converters" category.

    Regardless, I will allow this to be made automaticaly in the next version :)

    Cheers and thanks for pointing this need out!


    Hey,
    Thanks for the purchase! :)

    All FlowCanvas classes are in a namespace, but probably that other JSON class in your project is not within a namespace at all, and thus the conflict there. Regardless, I can of course explicitely call the JSON class with the namespace path in front in the next version, but it would be much better if that other asset was in a namespace as well to avoid conflicts :)

    Regarding performance, it's really greatly optimized and fast for a non code generation tool. At runtime there is realy not much going on between node port calls, but it is rather just a direct delegate call.
    Also, because the tool is build to work with explicit types instead of passing object type between nodes for values, there is no value boxing except in the occasions of automatic converting or casting values (for example when connecting a float to an integer).

    Let me know if you have any questions or suggestions and once again thanks for the purchase :)

    Cheers!
     
  18. Dbone

    Dbone

    Joined:
    Mar 10, 2014
    Posts:
    56
    Thanks for looking in to this Nuverian!

    I'm really looking forward to the new FC update. Sounds like there'll be some great things in there.

    I can't find the CastTo<T> node. There is a ConvertTo <T> category but it only allows me to choose system types. The other two options in the convert category are for arrays and lists.
     
  19. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Ah, sorry. I must have added this after realease. Here is the code for CastTo. You can add it in the Converters.cs file along the rest.
    Code (CSharp):
    1.     [Category("Utilities/Converters")]
    2.     public class CastTo<T> : PureFunctionNode<T, object>{
    3.         public override T Invoke(object obj){
    4.             try { return (T)obj; }
    5.             catch { return default(T); }
    6.         }
    7.     }
     
  20. Dbone

    Dbone

    Joined:
    Mar 10, 2014
    Posts:
    56
    Tried the CastTo<T> node and it works nicely. Unfortunately, I was still getting that same error. I took a good look at it and realized that I was actually getting two identical errors like this every time I hit play. I figured out from that that what was going on is that I have an OnEnable event that first caches the FingerPoseMotor on the blackboard, and then I have an OnUpdate event that runs the action from the cached FingerPoseMotor on the blackboard. The error happens because the OnEnable event doesn't have enough time to grab and cache before the OnUpdate starts running. OnUpdate has enough time to throw two errors before it can find the object it needs and starts to run properly.

    I can't figure out a way to delay the OnUpdate event from starting for a few frames, so my only other option is to not use OnEnable to cache and instead just run the whole thing in OnUpdate.

    Just thought I'd share.
     
  21. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Oh, I see.
    It's a bug that OnEnable is called after the first OnUpdate calls. Sorry about that, but it sliped away.
    I have just fixed that today though :)
    The next version will also be sumbited tomorrow.

    Thanks!
     
  22. nuverian

    nuverian

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

    A new version is now live on the asset store. Here is what's new:
    • Added nodes for Lists actions.
    • Added new Event nodes (Custom Event<T> and Code Event<T> to use for value events).
    • Added CastTo<T> node
    • On top of that, automatic downcasting for value ports has been added at connection level.
    • Fixed several minor bugs.

    Last but not least added an integration with NodeCanvas FSMs. So it's possible to have a whole FlowScript as an FSM state! As long as the state is active, events will be fired normaly, otherwise they will not. Furthermore you can model OnEnter, OnUpdate and OnExit of the state with the normal Flowscript events, OnEnable, OnUpdate and OnDisable.
    Also, blackboard variables are propagated to the FlowScript from the FSM, or in other words, they are shared.

    FSM.png
    FSM

    FlowScriptState.png
    FlowScript

    Cheers!
     
    bilke and Wylaryzel like this.
  23. Dbone

    Dbone

    Joined:
    Mar 10, 2014
    Posts:
    56
    Nuverian, could you explain how to add a Flowscript as an FSM? I tried a few ways but nothing seems to work.
     
  24. nuverian

    nuverian

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

    There is a .unitypackage file under the "FlowCanvas/Integrations" folder. This includes the 'FlowScriptState.cs'.
    After you extract/import the package, you will be able to add a FlowScript State through the usual right click context menu in the FSM canvas and with the "Nested/FlowScript" item, similar to how you would add a nested FSM or BT. :)

    Let me know.
    Cheers!
     
  25. Wylaryzel

    Wylaryzel

    Joined:
    Sep 13, 2013
    Posts:
    126
    Hi there,

    btw, did you had time to check with regards to the event system of NGUI? Or is it already fixed in the current version (to be honest, didn't had time to check :)
     
  26. nuverian

    nuverian

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

    Are you refering to the notify field of the UIButton of NGUI?
    It seems that NGUI's UIButton 'notify' field, does not take into account inherited functions, like the SendEvent in FlowSciptController is, similar to how the UnityEvents do.
    I really don't understand this behaviour from NGUI.

    In UGUI this works correctly.
    UnityEvent.png

    Or are you refering to something different? :)

    Thanks
     
  27. Wylaryzel

    Wylaryzel

    Joined:
    Sep 13, 2013
    Posts:
    126
    Hi there,

    You are right. As far as i understood ngui has its own event system as it was introduced before the event system of unity was there. And it seems he dont want to change it...
     
  28. Carpe-Denius

    Carpe-Denius

    Joined:
    May 17, 2013
    Posts:
    842
    I have some things:
    - Are there graph or macro-specific variables, like a blackboard? If you have some macro-specific dynamic variables now, they will share it if you use the macro in several places. That could probably lead to collisions.
    - dynamic vars can't easily be set, you have to create a blackboard variable of the same type, change the name and remove the blackboard variable again
    - are there known issues? Sometimes I keep losing connections to macros after I stopped the game in editor and I can directly type in values of macro inputs, but if I start the game, they reset so I have to use graph variables

    Other than that: I am glad I bought it, I feel much more creative now. I had my own node-based graph before, but it hadn't fancy things like autoconversion and I needed more time to maintain the graph than using it..
     
  29. nuverian

    nuverian

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

    Thanks. I am glad you like FC.

    - Currently there are no Macro specific/private variables. The idea is that a macro is like a part of the parent flowscript, but compounded, so the fact that the variables are "shared" is indeed by design :)
    I can certainly take a look at this request though.

    - I can see what you mean. A way to make this easier, would be to expose the SetVariable node in the nodes menu. If you want to do it now, please open up SetVariable.cs and remove the [DoNotList] attribute from the class. Optionaly add the [Category("Variable)] too, for organization. Let me know if this is what you are after.

    - The only issue I am aware of, is losing the connection when renaming Macro input/output definitions, but losing connections of the macro when exiting Playmode is something that hasn't really occured to me. Is that something that you can reproduce with some steps?

    Thanks again!
     
  30. Carpe-Denius

    Carpe-Denius

    Joined:
    May 17, 2013
    Posts:
    842
    - I don't know if it will lead to problems, but it could possibly do. Just think of a macro which counts to 10 and after that, uses a flow out. Now I use that macro for 2 different Buttons and count both buttons with a macro each. With a shared variable, both macros will fire "done", even if there are just 10 button presses in total

    - yes, that's great.

    - It happens all the time. I don't know if it helps, but here is a unitypackage with two macros and a flowscript and 3 screenshots, how they were set up before I exported them for you:
    http://www.thomas-werner.name/connectionproblem.unitypackage
    I had an error once (wrong index, because I had an empty list and tried to get the item 0) and once unity crashed; after that I had the connection problems. If I copy the nodes and paste them into a new flow script, everything works again, so it may be something in the asset file itself.

    That being said... I made a diff between the original canvas and the newly created and pasted canvas, I couldn't find anything strange...

    If I set up the flow scripts and press start, it works, so they survive the game start (I think they get serialized and deserialized at that point), I don't know why they get killed at game end.
     
  31. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Thanks a lot for the package and the information provided.
    I will check on it in the comming few hours and let you know.

    Regarding Macro specific variables, I will take a look at this :)

    Thanks!
     
  32. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    @Carpe Denius :
    Sorry for the late reply.
    I took a look at the package, but I can't seem to reproduce the case where the connections are broken by themselves :/
    I will keep an eye on this and do more tests, but let me know if it happens again.

    Thanks!
     
  33. Carpe-Denius

    Carpe-Denius

    Joined:
    May 17, 2013
    Posts:
    842
    Maybe it was just my test project. Thank you for looking into it, I will tell you if the problem stays and if I can find something reproducible.
     
  34. Dan_lala

    Dan_lala

    Joined:
    May 14, 2015
    Posts:
    42
    I have some questions about the application of FC :)

    1. I am working on something simple and turn-based (basically text and variables) and just want to string different scripts together, i.e. call functions from different classes and modify their variables while maintaining a good overview... I just feel that a standard FSM is over the top for such task. So this is where FC shines at, right?


    Some more questions:
    2. Are 3rd party nodes created automatically and when does it check for new nodes / 3rd party content?
    3. When will the extensive manual approx. be released?
    4. What examples are already included to get started?
     
  35. nuverian

    nuverian

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

    FC works with events, so to start an execution flow, you will have to send some events to the FlowScript controller (or use some of the built in ones) from where on, you will be able to link together nodes to achieve the required result. These nodes in your case can be function calls and/or property set calls of existing components for example.

    So, yeah. If you want to do the above, FC will fit in there nicely :)

    For your other questions:
    1. All you have to do for nodes apear, is to add the type you want to use in an editor window (Preferred Types Editor). For example bellow, if I add the PlayMakerFSM type in that menu, I get these nodes to use:

    Actions
    PM2.png

    Functions

    PM1.png

    Adding types manualy (once) is done to avoid cluttering the menus.
    In next versions, you will also be able to define a whole namespace instead of specific types by the way.

    2. The manual got delayed a bit, but each node has a small help text, that describes what it does.
    Basicaly the manual will be what the quickstart PDF reads a bit more expanded on each subject, plus documentation on creating custom nodes, which is uterly missing now. I will press on the more complete manual soon. Once again, sorry for the delay.

    3. Some examples showing best practises in how nodes can be used, will be included in the next version. Currently there are no examples.

    Of course, if you have any questions, I am always here and glad to answer :)

    Cheers!
     
  36. Carpe-Denius

    Carpe-Denius

    Joined:
    May 17, 2013
    Posts:
    842
    Tell me which examples you want, I can prepare some if you want to..
     
  37. dippnsk

    dippnsk

    Joined:
    Feb 12, 2015
    Posts:
    8
    Is iOS really unsupported? As far as I know, there is a problem with generic types and methods, so they must be AOT-compiled, to be able to create and use this types in runtime via Activator. But what about normal types? If a FlowScript will contain only real types, which compiled to the app, is there some restrictions inside FlowCanvas to work?
     
  38. Dan_lala

    Dan_lala

    Joined:
    May 14, 2015
    Posts:
    42
    Thank you for the reply... the manual is not that urgent though, no need to be sorry ^^ I think if I would ask here I would get some help creating custom nodes :) Going to cs script my way through a bit more and get back to the FSM / flow idea once stitching everything together gets annoying.
     
  39. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    That's great :)

    Hello,
    Yes, the restriction is because FlowCanvas itself uses generic types a lot, but with that said, I am working on some tricks that I've done on my other asset to make FC supported in iOS, but currently it's not :)
    Cheers!


    Hey,
    Sure, that sounds great. I willl be here if/when you come back :)

    Cheers and thanks!
     
  40. dre788

    dre788

    Joined:
    Feb 15, 2013
    Posts:
    52
    Greetings, recently I bought flow canvas and I'm enjoying the depth it gives me. I noticed a few operations missing in the math menu for floats and integer. Things such as random, average, cos, sin, tan, range, just to name a few. Can these be implemented or did I miss them in my brief escapade?

    Also, is it possible to make dialogue canvas compatible with flow canvas. They seem like they would work great together.
     
  41. Carpe-Denius

    Carpe-Denius

    Joined:
    May 17, 2013
    Posts:
    842
    Functions -> Reflected -> Random -> ...
    Functions -> Reflected -> Mathf -> Sin, Cos...
     
    nuverian likes this.
  42. dre788

    dre788

    Joined:
    Feb 15, 2013
    Posts:
    52
    Ohhh, I see. I need to add them to the editor. Oh my, this is quite the list of options. Thanks Carpe Denius.
     
  43. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hello and thanks!
    Carpe Denious prety much answered the question :). You can add Mathf and Random to the Preferred Types Editor if not already in the list.

    Regarding the dialogue canvas combatibility, what kind of combatibility do you mean? You mean a way to start a dialogue tree through a flowscript and similar?

    Thanks!
     
  44. dre788

    dre788

    Joined:
    Feb 15, 2013
    Posts:
    52
    It seems DC requires NC to work. I was wondering if FC could work with DC in the same way.
     
  45. nuverian

    nuverian

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

    I don't really follow what you mean :) I'm really sorry.
    You can have both NC and FC in a project if that's what you are asking.
    All you will need to do, is to delete the sub-folder named "Framework" from either NC or FC, keeping only one. Preferable the latest, which currently is the one in NC.

    Is that what you are asking though?
    Let me know.
    Thanks.
     
    Last edited: Jun 12, 2015
  46. dre788

    dre788

    Joined:
    Feb 15, 2013
    Posts:
    52
    Sorry, I was in a hurry when I wrote the last message. Essentially what I'm asking is, can I use Dialogue Canvas with Flow Canvas without owning Node Canvas? And if not, can you set up both Dialogue Canvas and Flow Canvas to be compatible with each other so Dialogue Canvas can work through Flow Canvas instead of just Node Canvas?
     
  47. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Ah, I see what you mean now. The thing is that I have already contacted the asset store team to remove the DialogueCanvas package from the store, because it's part of NC now. It might be released as a standaone in the future though.
    Thanks.
     
  48. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hello everyone. A new version has been submited to the asset store. Here are the changes:

    - Added new Event nodes to subscribe to c# events with either none or one argument of any type and either instance of static events. For example:
    Code (CSharp):
    1. public class ExampleEventScript : MonoBehaviour {
    2.  
    3.     public event System.Action<float> SomeEvent;
    4.  
    5.     public void ExampleCall(float arg){
    6.         if (SomeEvent != null){
    7.             SomeEvent(arg);
    8.         }
    9.     }
    10. }
    CodeEvent.png

    - Dragging any output value port in the canvas will show options to create a new variable of the type dragged.
    - Fixed Preferred Types editor from reseting and filtering out certain types.


    Cheers!
     
  49. nuverian

    nuverian

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

    The new version is now live on the asset store.

    Speaking of versions, the next one will come with the ability to execute and check encapsulated action and condition tasks, without exposing any ports, which probably is considerably easier to use for non technical people :)

    For those familiar with NodeCanvas it basicaly means that all existing or custom ActionTasks and ConditionTasks will be able to be used within an FlowCanvas flowscript.
    For FlowCanvas itself, it basicaly means that the next version will come with some premade high level actions, as well as the ability to use all 3rd party integration nodes already available for NodeCanvas those being for:

    • Chronos
    • Cinema Director
    • Core GameKit
    • DOTween
    • Inventory Pro
    • LipSync
    • Love/Hate
    • Master Audio
    • Motion Controller
    • PlayMaker
    • PolyNav
    • Simple Waypoint System

    Cheers!
     
  50. sledgeman

    sledgeman

    Joined:
    Jun 23, 2014
    Posts:
    389
    I was really curious and could not resist. So i bough your whole product palette (NodeCanvas & FlowCanvas). I allready own PlayMaker, so i would say, i have a good comparison.

    If someone would ask me what "FlowCanvas" (NodeCanvas) is, i would give this short answer:
    FlowCanvas = similar to uScript (imho really easier to understand and very powerfull !)
    NodeCanvas = similar to PlayMaker (imho much more logical to me, better overview, really great workflow !)

    I really like the combination of Behaviour Tree & FSM. And the nested "FSM´s" & "BTs". As i read "FlowCanvas" is in beta, i just would like to know if it will be possible to get / set "nested FlowCanvas" inside the FSM & BT ? This would be awesome !