Search Unity

FlowCanvas - Visual Scripting Similar to Unreal Blueprints

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

  1. AndyGFX

    AndyGFX

    Joined:
    Jan 13, 2012
    Posts:
    98
    Hellou,

    FlowCanvas Visual Scripting Beta 0.9.5 is OUT
     
    nuverian likes this.
  2. nuverian

    nuverian

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

    The new version is live on the asset store :) Thanks @AndyGFX
    The changes post is here.

    If you like it, leaving your review would be greatly appreciated and motivational :)
    Cheers!
     
  3. ravendevil1967

    ravendevil1967

    Joined:
    Jan 9, 2015
    Posts:
    7
    I got like 130 errors when installing.....

    Assets/FlowCanvas Resources/NodeCanvas Integration/NC Nodes/BTNestedFlowScript.cs(15,43): error CS0246: The type or namespace name `BTNode' could not be found. Are you missing a using directive or an assembly reference?

    Assets/NodeCanvas/Systems/FSM/FSMState.cs(17,42): error CS0246: The type or namespace name `Node' could not be found. Are you missing a using directive or an assembly reference?

    All like these...
    Any Ideas....?
     
  4. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    @ravendevil1967 Hey, I have replied to your other post in the NodeCanvas thread.
    Thanks
     
  5. Polywick-Studio

    Polywick-Studio

    Joined:
    Aug 13, 2014
    Posts:
    307
    - Need an ability to restart a stopped task. How do you do that?
    - Is there a way to say - wait 1 second, wait 2 seconds?
     
  6. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hello,
    Can you please clarify your first question?
    Regarding 'Wait', there is a Wait node under "Actions/Utilities".

    Thanks.
     
  7. unitywlp

    unitywlp

    Joined:
    Jan 3, 2014
    Posts:
    146
    HI
    can you make a sample video explaining how flow canvas make use of third party api and make node i have blox with similar feature but after using the plugin i was not satisfied.
    so i want to learn more about your asset can you show an example like
    https://www.assetstore.unity3d.com/en/#!/content/9555
    show how to use this plugin as example free and make a simple demo using nodes
    Thanks

    If flow canvas was able to make any one real demo that demonstrate the power i will buy
     
  8. AndyGFX

    AndyGFX

    Joined:
    Jan 13, 2012
    Posts:
    98
    Hi,

    How can I create(add/remove)/manage List items in my own graphnode?

    One option is create public variable List<...>, but this list is visible only in node inspector and not in nodeGraph.

    Second option:

    Code (CSharp):
    1.  
    2.  
    3. private ValueInput<List<string>> tags;
    4. ....
    5.  
    6. this.tags = AddValueInput<List<string>>("Tags");
    7.  
    This doesn't works for me.

    Andy.
     
  9. AndyGFX

    AndyGFX

    Joined:
    Jan 13, 2012
    Posts:
    98
    Hellou,

    On Awake graphNode has problem, when a lot of gameObjects are in scene, then Awake node is fired before all monobehaviours Awake method are done :(
    This is a big issue when nodeGraph need, for example read tree structure, to acces of any gameObject inside tree and because monobehaviour Awake method isn't done, automaticaly from node is returned error message:

    Flow Execution Error: </b> 'Object reference not set to an instance of an object'

    Edit: Sorry looks like something is wrong with my own node :(

    Code (CSharp):
    1. using FlowCanvas;
    2. using NodeCanvas.Framework;
    3. using ParadoxNotion.Design;
    4. using System.Collections;
    5. using System.Collections.Generic;
    6. using UnityEngine;
    7.  
    8. namespace FlowCanvas.Nodes
    9. {
    10.     [Category("Cubes Team/GameObject")]
    11.     [Name("Find child object by name")]
    12.     [Description("Find child gameObject recursively from assigned root object by name")]
    13.     public class FC_FindChildObjectByName : FlowControlNode
    14.     {
    15.         private FlowInput In;
    16.         private FlowOutput Out;
    17.  
    18.         private ValueInput<GameObject> rootItem;
    19.         private ValueInput<string> objectName;
    20.  
    21.         private GameObject findedItem;
    22.  
    23.         public override void OnGraphStarted()
    24.         {
    25.             base.OnGraphStarted();
    26.             this.findedItem = SearchHierarchy(this.rootItem.value.transform, this.objectName.value).gameObject;
    27.         }
    28.  
    29.         protected override void RegisterPorts()
    30.         {
    31.             // output ports
    32.             this.Out = AddFlowOutput("Out");
    33.  
    34.             // input ports
    35.             this.In = AddFlowInput("In", (f) =>
    36.             {
    37.                 this.Out.Call(new Flow());
    38.             });
    39.  
    40.             this.rootItem = AddValueInput<GameObject>("Root object");
    41.             this.objectName = AddValueInput<string>("Object name");
    42.  
    43.             AddValueOutput<GameObject>("Child object", () =>
    44.             {
    45.                 return this.findedItem;
    46.             });
    47.         }
    48.  
    49.         private Transform SearchHierarchy(Transform current, string name)
    50.         {
    51.             // check if the current object is the gameObject we're looking for, if so return it
    52.             if (current.name == name)
    53.                 return current;
    54.             // search through child object for the gameObject we're looking for
    55.             for (int i = 0; i < current.childCount; ++i)
    56.             {
    57.                 // the recursive step; repeat the search one step deeper in the hierarchy
    58.                 Transform found = this.SearchHierarchy(current.GetChild(i), name);
    59.                 // a transform was returned by the search above that is not null,
    60.                 // it must be the gameObject we're looking for
    61.                 if (found != null)
    62.                     return found;
    63.             }
    64.  
    65.             // gameObject with name was not found
    66.             return null;
    67.         }
    68.     }
    69. }
    Andy.
     
    Last edited: Aug 22, 2015
  10. nuverian

    nuverian

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

    Thanks for your interest. Once version 1.0 has been released there will be a website, with documentation, downloads and more, which is very soon :)

    Regarding using FlowCanvas with 3rd party APIs (and Unity API as well), the way it works is this:

    - There is an editor window through which you can add/remove the Types (classes, enums, etc) which you want to be available.
    PreferredTypes.png

    - Then all Methods and Properties of those Types in the list will be available as nodes in the FlowCanvas editor.
    Context.png

    - Furthermore, regardless if a Type is in that list, when you drag a value port on the void canvas, all of the draged port's Type Methods and Properties will be available as nodes too.
    PortContext.png

    I will make sure to include more specific examples when the website is up.

    Thanks!

    Hey Andy,

    Here is the best way to create the node that you want:
    Code (CSharp):
    1.     public class FindChildByName : CallableFunctionNode<GameObject, Transform, string>{
    2.  
    3.         public override GameObject Invoke(Transform root, string name){
    4.             var t = SearchHierarchy(root, name);
    5.             return t != null? t.gameObject : null;
    6.         }
    7.  
    8.         Transform SearchHierarchy(Transform current, string name){
    9.             if (current.name == name)
    10.                 return current;
    11.             for (int i = 0; i < current.childCount; ++i) {
    12.                 var found = this.SearchHierarchy(current.GetChild(i), name);
    13.                 if (found != null)
    14.                     return found;
    15.             }
    16.             return null;
    17.         }
    18.     }
    FindChildByNameCallable.png

    Also, you could instead of deriving from CallableFunctionNode, derive from PureFunctionNode, if you dont want the node to require Flow Execution.
    FindChildByNamePure.png

    The above is the easiest way of creating custom nodes, since it takes care of port registrations for you automaticaly. There are more ways to create more complex nodes similar to how the FlowControl nodes are created, but most of the times it's really not required. If you want help in creating nodes with the other method available (the one you originaly tried to use), let me know and I can provide more details :).

    Regarding using Lists, it's similar to the above. You can take a look at the included list nodes (Lists.cs). Here is a example:
    Code (CSharp):
    1.     [Category("Actions/Lists")]
    2.     public class AddListItem<T> : CallableFunctionNode<IList<T>, List<T>, T>{
    3.         public override IList<T> Invoke(List<T> list, T item){
    4.             list.Add(item);
    5.             return list;
    6.         }
    7.     }
    Please let me know if you need more clarifications.
    Thanks!
     
  11. AndyGFX

    AndyGFX

    Joined:
    Jan 13, 2012
    Posts:
    98
    Hi.

    CallableFunctionNode & PureFunctionNode, both works great now in my nodes.

    Thanks.
     
  12. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
    finally bought flowcanvas and and its a pleasure to mess around with it. everything is just so clean and intuitive. good job!

    so, while doing some experiments iam somehow missing an object.instantiate class. or maybe iam just blind? i also try to find/add it in the preffered type window but also no sucess. where is it hidden? :D
     
  13. nuverian

    nuverian

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

    Thanks a lot for getting FlowCanvas. I am very glad you like it.

    The Object.Instantiate can be found under "Functions/Reflected/Object/Instantiate" :)
    It is found under Functions and not Actions, because Instantiate, returns a value (instantiated object). All methods that return a value are placed under Functions and all void methods under Actions.

    I was thinking of adding all methods regardless return type under Actions as well, in the next version and that would probably be better than the way it is now.

    Let me know if you have any more questions :)

    Thanks again!
     
  14. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
    ah, thanks, found it :) i was just looking for the first letter (I for instantiate) but its called static Instantiate so i just didn't saw it :D
    i think its doesn't matter where it appears, when you know where to find it, its fine
    more helpful would be a search field somehow?

    still, i got a pretty noob question. i just wanted to instantiate an object when i press space, so i used events> input> keyboard and from the "down" field i wanted to connect it to the object.instatieate object, but it says cant connect here. could you maybe explain why?
     
  15. nuverian

    nuverian

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

    An output Flow Port can only be connected to input Flow ports. You can't connect Flow Ports with Value Ports. Flow ports are the bold ones marked with a ► symbol.

    All Function nodes, by default apear without Flow Ports, or in other words, you can use them without Calling them. So in the bellow node, if you connect "Value" to some other port, the moment the "Value" is requested, it will also Instantiate the Original object assigned or connected. It's like calling the method and returning it's value when and only requested.
    NonCallable.png

    But all Function nodes also have an option named "Callable" in the Node Inspector.
    When the node is set to be "Callable", two Flow Ports will appear (Input/Output).
    Here, the Instantiation will only happen when the node is Called, through the input Flow Port (►) and the Value will only return the object instantiated the last time the node was Called.
    So it's kinda more like calling the method (Instantiate) and storing the return value temporary in the output Value port.
    Callable.png

    Please let me know if you need more clarification :)

    Cheers!
     
  16. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
    ah, now i get it - pretty smart to solve it that way.
    so, iam already stucked again... i hope your forum will be up soon so i dont have to spam your assetstore thread ;)
    so. i want to instantiate the object now where another object is already placed, so copy the vector3 position from another object.

    so i took the object.instantiate(Object, Vector3...)
    and then, on the position port placed the function>utility>get component vector3 and dragged in there the gameobject with the right XYZ values, but still, the object gets instantiated like the prefab was set up (0,0,0)
     
  17. nuverian

    nuverian

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

    I will try and bring up the website/forum as soon as possible.

    So, the easiest way would be to directly connect a gameobject to the Vector3 port, which is possible due to automatic convertion feature.
    I have made it so that GameObject converts to Vector3 through its '.transform.position' property :)
    FS.png

    You could of course go the long way like this, since Transform, converts to Vector3 though .position:
    FS2.png

    Or even the longest way like this:
    FS3.png

    All of the above result in the same thing. the "Position" parameter port will be the equal to the "PositionalGameObject" transform.position property.
    But of course directly connecting the gameobject saves from adding extra nodes :)

    I wonder how you have set it up though.

    Cheers!
     
  18. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
    thank you verry much, i got it almost the same as your second example, but instead of get component <transform> i used get component <vector3> and that didnt worked ;)

    because:
    if you drag a line from Object.Instantiate - position port into "nowhere"/empty place you wont find the get component transform node. under function>utility>get component... is only the get component vector3 node :)
     
  19. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Oh! Thats actualy a bug! :)
    Vector3 should of course NOT apear in that menu under GetComponent. I will have to fix this.
    Thanks for noticing.
     
  20. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
    yay! my first bugreport :D
    and to not waste a post: do you have any plans to add a searchfield for nodes someday? its not super important cause everything is good organized but sometimes i feel the need to type a little bit ;)
     
  21. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    If you have Unity Pro, you can press the tilt key ` (left of 1, above TAB), to open a more complete browser which has a search field. It's kind-ish of a hidden feature currently cause it needs some more work :)

    Thanks again!
     
  22. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
    no, only unit 5 personal. but thats a pro feature? how is that called?
    i am having a german (QWERZ) keyboard and a macbook pro. so maybe i cant find the key. cause above ALT is ^ and ° on my machine. i also cant find the symbol you have posted. only ´this `and ' and this '
     
  23. AndyGFX

    AndyGFX

    Joined:
    Jan 13, 2012
    Posts:
    98
    Hi,

    I looking for a best practice for this nodeGraph logic:
    after collision with gameObject I need change a few values on player controller and then remove this gameObject (this part is OK) but before Destroy I need send delayled message for restore values on player control component and here is my problem, because I can't use node Wait, (nodeGraph is removed via Destroy gameObject) and using coroutine node isn't clean for me. I know that coroutine is way, but I need example for using Coroutine node similar to this code which will be called in nodeGraph before destroy self.

    Code (CSharp):
    1. public IEnumerator ReturnBackGravityPower()
    2.     {
    3.         yield return new WaitForSeconds(this.delayToReset);
    4.         GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerGravityControl>().RestoreGravityPower();
    5.     }
    My solution doesn't work :(


    Andy.
     
    Last edited: Aug 25, 2015
  24. nuverian

    nuverian

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

    It's actualy a FlowCanvas feature, which is the node browser shown in the 2nd image of the first post in this thread, but it has some color problems in the light theme which I need to fix.
    It's opened with the ` key when the canvas editor window has focus. (the 2nd symbol you've posted as found). :)

    Hey,

    In the posted graph, the "Finished" output port of th Coroutine node is never called, since the "Finished" port is called when the Coroutine node "Break" port is called.

    If I understood correctly, you want to destroy Self and then continue executing some nodes on later frames.
    If that's the case, it's unfortunately not possible right now, because whenever the FlowScriptController is Disabled or Destroyed, the assigned FlowScript graph is Disabled as well. There is an option in the inspector for not doing that OnDisable but no option for OnDestroy.
    So the solution would be to add such an option. You can open up GraphOwner.cs and at line #180 change to this:
    Code (CSharp):
    1.             if (disableAction == DisableAction.DisableBehaviour)
    2.                 StopBehaviour();
    Then in the FlowScriptController inspector make sure that OnDisable, Nothing Happens:
    Option.png

    Doing the above changes, the following flowscipt will work fine:
    Example.png

    I will probably have to add an extra option in the inspector "OnDestroy" rather than merging it with the OnDisable option.

    Cheers!
     
  25. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
    hm, doesent work for me shomehow, i have the nc editor in focus and pressing ° like hell :D

    got this keyboard: http://www.apple.com/shop/product/MC184D/B/apple-wireless-keyboard-german
    and also switched to us keys but also doesn't work. which script is responsable for this? maybe i have to change the key binding?

    i think i got it:
    Code (CSharp):
    1. //Tilt '`' opens up the compelte context menu browser
    2.             if (e.type == EventType.KeyDown && e.keyCode == KeyCode.BackQuote){
    3.                 CompleteContextMenu.Show( GetAddNodeMenu(canvasMousePos), e.mousePosition, string.Format("Add {0} Node", this.GetType().Name) );
    4.             }
     
    Last edited: Aug 25, 2015
  26. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    I guess I will have to change the shortcut after all :)
    Just to be clear, the KeyCode is BackQuote.
    Reading about this it presumably is possible using (Option) + (`) ?
    backquote.png


    EDIT:
    The code responsible is EDITOR_Graph.cs line #308
     
  27. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
    i replaced the line from KeyCode.BackQuote to KeyCode.Comma
    now it works ;)
     
  28. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    I will obviously have to change the shortcut in next version for mac users :)
     
    Der_Kevin likes this.
  29. AndyGFX

    AndyGFX

    Joined:
    Jan 13, 2012
    Posts:
    98
    Hi,

    thank, with this modification on line 180, works my graph logic great now.

    Will be this one added to next release?

    Andy.
     
  30. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hey Andy,
    Glad to know. Yes this will be on the next release :)

    Cheers!
     
  31. Karsten

    Karsten

    Joined:
    Apr 8, 2012
    Posts:
    187
    hi,
    is there some documentation how to write your own action and function nodes? Because some complex things are better made in an specific action especially when much math is involved the graph grows massively only because of some more complex Algorithms.

    Karsten
     
  32. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hey,
    There will be soon, but meanwhile here is brief on how to create custom Actions and Functions.

    To do so, you must create a class deriving from either of the following:
    CallableActionNode: Needs Flow execution and does not return a value.
    CallableFunctionNode: Needs Flow execution and returns a value.
    PureFunctionNode: Does not need Flow execution and returns a value.

    All of the above are generic types and when you derive from those, the generic arguments you specify are used for the parameter types and return type of the node. Then all you have to do is override the Invoke method and thats it :)
    For example:
    Code (CSharp):
    1. //Callable Action. The return type of Invoke is always void
    2. public class Log : CallableActionNode<string>{
    3.     public override void Invoke(string text){
    4.         Debug.Log(text);
    5.     }
    6. }
    7.  
    8. //Callable Function. The return type of Invoke is the first argument.
    9. public class Add2 : CallableFunctionNode<float, float, float>{
    10.     public override float Invoke(float a, float b){
    11.         return a + b;
    12.     }
    13. }
    14.  
    15. //Pure Function. The return type of Invoke is the first argument.
    16. public class Add : PureFunctionNode<float, float, float>{
    17.     public override float Invoke(float a, float b){
    18.         return a + b;
    19.     }
    20. }
    21.  
    22. public class MultiplyVector : PureFunctionNode<Vector3, Vector3, float>{
    23.     public override Vector3 Invoke(Vector3 vector, float m){
    24.         return vector * m;
    25.     }
    26. }
    27.  
    The generic arguments apearence is the same as their apearence in the override method. To clarify:
    Code (CSharp):
    1. public class Add : PureFunctionNode<T1, T2, T3>{
    2.    public override T1 Invoke(T2 a, T3 b){
    3.  
    4.    }
    5. }
    Let me know if you need any more clarification.
    Thanks!
     
  33. dancinLion

    dancinLion

    Joined:
    Jul 16, 2012
    Posts:
    14
    Hi,

    yesterday I purchased NodeCanvas and FlowCanvas in order to make things easier for my current project. So far I really like it, however, I have a few questions/problems/suggestions:

    1. How do I set blackboard variables on other objects in Flow Canvas? My enemies shoot projectiles that track a target, so I would like to set the projectiles blackboard variable trackingTarget after I instantiate it.

    2. When instantiating 5 of my enemies via a simple spawn FlowScript, the game stutters for a moment. I know that in the long run I should not instantiate on the fly but use a pooling system, but this doesn't seem right? For testing purposes I exchanged the enemy prefab with a simple prop prefab that does not have any scripts on it, and this does not create any stuttering. So it seems that it is not related to the spawn FlowScript. On the enemy prefab I have a Behavior Tree Owner Script and a Blackboard, as well as a box collider and nav mesh agent. When I deactivate all components (apart from the blackboard which cannot be disabled) on the prefab and then instantiate it, the stuttering is still there. The behavior tree on the prefab is quite simple but has two nested FlowScripts in it. I also tried to disable the whole behavior tree by disabling one of the first nodes, but I still get the stuttering. Any idea what this could be?

    3. I'm doing some kind of bullet hell/twin stick shooter - many enemies, projectiles, explosions etc. Do you have any do's or dont's in regards to NodeCanvas and FlowCanvas and performance? E.g. do not instantiate bullets via FlowScripts (just as an example :))

    3.I'm using a german qwertz keyboard from logitech, and the key to open the node browser does not work - I had to manually replace the keycode in the script like you suggested for another user in this thread. I guess this should be something for the preferences/initial setup?

    4. When I open the node browser, I'd like to start typing immediately instead of having to click with the mouse into the input field. The up and down arrows should allow me to select one of the search results, and enter should place the selected node. Basically something like the search bar in chrome - but I guess that's something you already are working on, seeing that usability is something you take into account when developing your assets (thanks for that!).

    5. I'd like to be able to organize blackboard variables. My enemies will have at least 20 different variables, possibly more, so being able to create categories would be great. As a second step, it would be cool to be able to collapse and expand these categories.

    6. Apart from iOS, do you know if your assets are not compatible with other platforms? Or, more specific, are your assets compatible with consoles?

    Thanks in advance!
     
  34. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hello and thanks a lot! :)

    Let me answer your questions:

    1. What you could do is to Send a value Event to the target FlowScript and then within that, use the event's value and set the blackboard variable. So for example you could use SendEvent<GameObject> and then in the projectile flowscript, use CustomEvent<GameObject> and use it's value:
    2015-09-07_00h33_25.png
    2015-09-07_00h34_31.png
    I will take a look if I can streamline the process even more :)

    2. Currently deserializing is a bit slow. I am looking into improving this quite a bit for the future versions.

    3a. The only performance hit right now that I know of, is deserializing, which is something I am looking at improving. Everything else is super fast :)

    3b. I've changed the shortcut for opening the browser to Space for the next version, which is something all keyboards have :) At the moment I'm not planning adding a preferences panel for shortcuts, but could be something to look at in the future.

    4. Yep, autofocusing the search field and generaly improving the browser is in my TODO. By the way, as it is currently, you can press TAB to jump in the search field as soon as the browser opens up. Also arrow keys and ENTER do work for navigating the menu if the search field has no focus (eg after pressing enter in the search field). I will certainly have to improve the browser though.

    5. Another guy on the NC forums suggested seperators for the Blackboard variables, which is something I've started implementing. I will take a look at improving these seperators into categories as soon as they are in place :)

    6. FlowCanvas currently requires JIT complilation to work, which most consoles do not support as far as I know. I'm looking at possible ways to bypass this requirement though.

    Let me know if you have any more questions/suggestions or need more clarification :)
    Thanks again!
     
  35. dancinLion

    dancinLion

    Joined:
    Jul 16, 2012
    Posts:
    14
    Thanks for your reply! A little follow up from me:

    1. I see. I already found the Events and made use of them, however, how can I send more than one variable to another object? It seems that events can only send one variable at a time, which is enough in this case, but I already have other places where this would be handy.

    2. Hm, so I suppose if I would replace the C# script on my bullets with a FlowScript, they would make the game stutter as well? Maybe I have to have a look into pooling earlier then.

    4. Thanks for the tips. Something that also came to my mind today: what if right click would open the browser at the mouse position, with the focus already in the search bar? I guess the browser is too big in its current form, but I hardly use the right click menu as typing in what I want is quicker than memorizing where it is located in the menu (at least for now). Maybe only the search bar in addition to the right click menu? Just some thoughts :).

    5. Great!

    6. I had to google JIT compilation as I'm more the designer guy than a software engineer :D, but now I have a rough idea what it should be. I found an article that states that the xbox one's xbox 360 emulator uses JIT compilation, but I guess that doesn't mean this is available for game developers as well. Do you have an idea how likely it is that you manage to bypass that requirement?
     
  36. Tropobor

    Tropobor

    Joined:
    Mar 24, 2014
    Posts:
    73
    Hi @dancinlLion
    Out of curiosity, I found your last two posts very interesting, but I do not understand what seems to be implied when you say :
    Thanks,
     
  37. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hey,
    Sorry for the late reply.

    1. Yeah, events only support one variable to be passed with them. I will take a look at other possible ways for setting variables to other graphs directly.

    2. After the improvement with deserialization, intiantiate will work much faster :)

    4. I personaly wouldn't want to completely replace the slim default context menu that shows on right click. After a while when your are familiar with the nodes available and their categories, it can become faster than the complete browser. For the time, I will go ahead and improve the browser :)

    6. It is very likely, but nothing I can promise for certain, because of the many things used in FlowCanvas that are simply not available without JIT, which will require a lot of workarounds to be done. It's something that I will take a look at, further down the roadmap.

    Thanks!
     
  38. Zajoman

    Zajoman

    Joined:
    May 31, 2014
    Posts:
    15
    Do you support saving and loading the state of FlowCanvas. So, basically, the ability to mark variables "to be saved", and save or load them at request.
     
  39. nuverian

    nuverian

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

    Yes. You can Save and Load variables in PlayerPrefs with a very easy method call:
    blackboard.Save(string key);
    blackboard.Load(string key);
    :)

    Let me know if that's what you mean.

    Cheers!
     
  40. ViktorCor

    ViktorCor

    Joined:
    Jul 22, 2012
    Posts:
    13
  41. Zajoman

    Zajoman

    Joined:
    May 31, 2014
    Posts:
    15
    Thank you for the answer!

    Well, apart from very simple games, PlayerPrefs is definitely not the way to go. I meant a solid mechanism to serialize and deserialize data to and from disk. Or better yet, returning an object with all the saved data so we can choose how to save that (that object should only contain data marked as "need to be saved", not everything).

    We are using our own serializer to save / load data, and the only thing a coder / designer needs to do is mark a class field with [Save] attribute. The save system then, at request, finds all instances of classes with at least one [Save] in them, and does its magic.

    I'm not saying every asset has to work like this; I'm asking whether you have a robust and easy to use save system in place, basically. :)

    Because if not, I can't picture people using it for anything but small demos or games that don't save.
     
  42. bryon

    bryon

    Joined:
    Mar 18, 2013
    Posts:
    1
    Viktor, you have to remember this all translates to code so what you're trying to do doesn't really make a lot of sense code wise. In code what you're creating is
    Code (CSharp):
    1.  void OnAwake()
    2.     {
    3.         Debug.Log("statement 1");
    4.         Debug.Log("statement 2");
    5.     }
    These 2 debug statements do not run at the same time, they run in sequence. So when you are connecting an out to an in, withFlow canvas it basically equates to a new statement separated by a semicolon.
     
    sanpats likes this.
  43. nuverian

    nuverian

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

    The welcome screen will be fixed as soon as version 1.0 of FlowCanvas is live, along with it's resources.
    Regarding the connections, it really doesn't work like that.

    A Flow Port (those with the big bold arrows), can have only one output, but multiple inputs. Think of those like functions. You can call a function from any place(inputs), but calling a function needs to be called in specific order one after another(output). You can use the Split node to call multiple nodes in order if you want to.
    2015-10-07_20h30_42.png

    A Value Port (all the rest), can have multiple outputs, but only one input. Think of those like variables. You can only use one value in the end as a function parameter(input), but you can feed the same value in multiple functions(outputs).

    Finaly, you can't connect Flow Ports to Value Ports and vice versa, since they are completely different things. One is function calls, while the other is variable getters. You can't call a variable :)

    The included QuickStart PDF explains these as well, but let me know if you need more help on the subject and I'll be glad to answer.

    Thanks.

    Hey,
    There is a JSON serializer behind it all (FullSerializer). You can serialize and deserialize a Blackboard and it's variables at will using 2 simple methods:
    string Serialize(); returns a json string, which you can do anything you want with it.
    bool Deserialize(string json); loads the json string back and initializes the variables again.

    You can also Serialize and Deserialize the graph as whole, but since the state of the graph should really be based on the variables used, serializing and deserializing the variables suffice for a game save/load.
    Variables can be marked as protected. Protected variables will not be serialized/deserialized in the next version (something I forgot to add).

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


    Thanks :)
     
    ViktorKom likes this.
  44. vixus

    vixus

    Joined:
    Apr 8, 2013
    Posts:
    6
    Hello,
    @nuverian
    ...or anyone else who is versed in the matter...


    I am trying to make a smart choice in wich direction shall i advance and i kinda like this but im interested in following:
    1. Can you please tell me is this "better" in any way that UE4 BP or it still lacks some features in compoarison to BP?
    2. Can i work in this while other team members work on same project the oldfashion coding way? (In UE4 BP thats possible).
    3. And one more thing... is this better or no to Playmaker?

    Money is not the issue but rather i want to make a right choice.
    Thank you.


     
  45. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hello vixus,
    Thanks for your interest in FlowCanvas.

    - Unreal's Blueprints, are aparently much more complete than FlowCanvas and in my opinion any similar plugin Unity can have. The reason is simply that BP is build into the unreal engine, while FlowCanvas (or any similar), is a plugin for Unity engine and not build right into the engine's core, but rather on top of it.
    FlowCanvas works in a similar way that Blueprints do and a similar visual workflow that they have, as far as how the node system works in the frontend, so that if you are familiar with BP, you will have no problem with FC. The backend though, is naturaly very much different between the two.

    - FlowCanvas does not generate code, so your second question might not apply here, if what you ment was working on the same FlowScript simultaneously. Let me know on that.

    - I would not like to compare FlowCanvas with Playmaker. They are very much different in how they work, what they do and why you would use either one and obviously I am biased between the two :)

    Let me know if you have any more questions and I'll be glad to answer or elaborate.

    Thanks!
     
    Last edited: Oct 12, 2015
  46. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    517
    Hey!
    can you give us an update about the 1.0 update and the flowcanvas website/forum :)
     
  47. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hey!
    I am working towards it. I had some other matters to attend to lately. Hopefully by the end of the month both will be up :)

    Thanks!
     
    Der_Kevin likes this.
  48. nors

    nors

    Joined:
    Oct 22, 2015
    Posts:
    3
    Just bought FlowCanvas. Great plugin. A couple of things that that could make life a little easier would be to have the node list permanently docked to the side instead of having to press ~. Or at least give the option. The other thing is making variables global so that a variable at the far left can just be copied and reused on the far right without having to draw connections, uScript has something similar. Still this is amazing work.

    Thanks again for a great plugin.
     
  49. sanpats

    sanpats

    Joined:
    Aug 24, 2011
    Posts:
    343
    A feature request for FlowCanvas and NodeCanvas: an ability to search references for node with specific tasks. HFSM can be a headache if there are many layers of sub-graph, when want to change some setting of a kind of node.
     
  50. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Sorry for late replies!

    Hey,
    Thanks a lot :)
    I will take a look at adding your first suggestion, although I am skeptical about it as to "where" the node will be added once selected in that window. Probably in the center of the canvas is my first though though :)

    Regarding your 2nd suggestion, can you please clarify a bit more what you mean?

    Thanks a lot again.

    Hey!
    Do you mean a search field somewhere that starts from the root Graph and searches all nested and nested in nested graphs etc, to find the nodes that are using a specific Task type?
    Let me know on this.

    Thanks