Search Unity

[Released] uNode - Visual Scripting [Support C# Import/Export]

Discussion in 'Assets and Asset Store' started by wahid_rachmawan, Oct 18, 2017.

  1. sledgeman

    sledgeman

    Joined:
    Jun 23, 2014
    Posts:
    372
    Integrating libraries / other plugins are really simple (#59). I got it work to use DOTween nodes ! Very cool :cool:
     
    wolfen231 likes this.
  2. Rixly239

    Rixly239

    Joined:
    Mar 31, 2014
    Posts:
    242
    How well do the State Machine & Behavior Trees integrate together? I'm thinking I need SMs to control player turns, then BTs to control AI under each state. With Bolt I have SM and can plug in Behavior Designer, but wondering if uNode would be a more seemless integration give it is one tool.

    Are the BTs going to mature similar to dedicated apps such as BD or NodeCanvas for example?

    uNode could be THE swiss army knife, lot to ask though...
     
  3. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    In uNode there are 2 graphs (flow and state) flow graph only allow flow node while the state graph allow all node from flow, state, even behavior tree. To integrate between State Machine & Behavior Trees there are many way in uNode ex:
    -Placing Behavior Trees under State Machine
    -Connect the transition of State Machine directly into Behavior Trees
    -Connect the target pin of BT node to SM
    -Using Group node to place BT or SM and connect the group to BT or SM

    No, Behavior Trees will be in uNode forever.
     

    Attached Files:

    • 2.gif
      2.gif
      File size:
      719.7 KB
      Views:
      396
    Last edited: Apr 5, 2018
  4. sledgeman

    sledgeman

    Joined:
    Jun 23, 2014
    Posts:
    372
    Some thoughts for add-Events:

    1.)There is a onGUI event. Can we have something like: onGuiEnter, -Pressed, -Over, -Down, etc

    2.)if(Input.GetMouseButtonUp(0)){ // 0=left, 1=right, 2=middle ... is there a way to add this also to our Event stuff ?
    So i can differ between the Mousebuttons and i think they behave like allways onUpdate (no need for a target object)
     
  5. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    1.) in unity documentation there are only one OnGUI Event so there is no way to add event like onGuiEnter as far as i know but you can make a condition to check if gui is pressed, over, down, up etc with If or Validation node.

    2.) can't if you mean that event is for do in EventNode but yes if you use Update, LateUpdate, or FixedUpdate to check the input with connecting to EventNode.
    a graph pic using Input.GetMouseButtonUp()
    Capture.PNG

    c# output:
    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using System.Collections.Generic;
    4.  
    5. public class ExampleClass : MonoBehaviour {
    6.  
    7.     void Update() {
    8.         if(Input.GetMouseButtonUp(0)) {
    9.             Debug.Log("Pressed left click.");
    10.         }
    11.         if(Input.GetMouseButtonUp(1)) {
    12.             Debug.Log("Pressed right click.");
    13.         }
    14.         if(Input.GetMouseButtonUp(2)) {
    15.             Debug.Log("Pressed middle click.");
    16.         }
    17.     }
    18. }
    19.  
     

    Attached Files:

    Last edited: Apr 6, 2018
  6. sledgeman

    sledgeman

    Joined:
    Jun 23, 2014
    Posts:
    372
    Okay. Will check it out soon ...thx
     
  7. Lanslot

    Lanslot

    Joined:
    Nov 18, 2016
    Posts:
    37
    because there are not any demonstration video,so i have some doubts:
    1) how can i write an interface class with uNode directly?
    2) when i was modified generated code, how to notify uNode to reparse C# Script to new flow?
    3) is there a way to write abstract class with uNode directly?
     
  8. Lanslot

    Lanslot

    Joined:
    Nov 18, 2016
    Posts:
    37
    I was regret to purchase this asset.
    Complex Operation, No document, No video, Exorbitant price, Much unknown error!

    upload_2018-4-8_10-40-3.png
    so, can you tell me how to link local variable to 'angle' slot?
    how can i get gameObject to link to Instance just like 'this.gameObject'?
    the checkbox is mean what?
    when i add 'gameObject',Graph Editor was crash!
    upload_2018-4-8_10-53-51.png
    upload_2018-4-8_10-51-19.png
     

    Attached Files:

  9. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    1.) For now its unsupported, but will be support in the future.
    2.) The c# parser is still beta and after stable i plan to sync between uNode and c#
    3.) Yes in the modifier enable the abstract.
     
  10. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    Hi @Lanslot,
    I am so sorry you get some problem like that.
    i have fixed that error in the new version but i still not submit it on asset store, you can PM me with invoice number to get the newer version.

    online documentation is here:
    http://maxygames.com/docs/
    the documentation is still under construction, if not found what are you looking for in the doc you can ask me.

    connect the angle to local variable node or by check the toggle in angle and select angle local variable.

    right click on graph, click "Add Node" and expand the "Target Reference" and find gameObject field.

    the checkbox mean you can directly using variable/property/method without creating a new node.
     
    Last edited: Apr 8, 2018
  11. Lanslot

    Lanslot

    Joined:
    Nov 18, 2016
    Posts:
    37
    when i click input slot:

    Should not be capturing when there is a hotcontrol
    UnityEngine.GUI:Button(Rect, GUIContent, GUIStyle)
    MaxyGames.<>c__DisplayClass66_0:<DrawValueConnection>b__4(Node) (at D:/My Project/uNode/Assets/SourceCode/Editor/uNodeEditorUtility.cs:1542)
    MaxyGames.uNode.uNodeEditor:DrawWindow(Rect) (at D:/My Project/uNode/Assets/SourceCode/Editor/uNodeEditor.cs:1492)
    MaxyGames.uNode.uNodeEditor:OnGUI() (at D:/My Project/uNode/Assets/SourceCode/Editor/uNodeEditor.cs:513)
    UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)


    suggestion:
    auto focus to InputField when add new node
     
  12. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    Thank you, i will check it soon.
     
  13. Lanslot

    Lanslot

    Joined:
    Nov 18, 2016
    Posts:
    37
    upload_2018-4-8_17-7-12.png
    this script was generated by uNode. Perfect ! But...
    upload_2018-4-8_17-8-20.png
    Error:
    upload_2018-4-8_17-9-9.png
    upload_2018-4-8_17-10-13.png

    It seems that it use Base by default.
     
    Last edited: Apr 8, 2018
  14. Lanslot

    Lanslot

    Joined:
    Nov 18, 2016
    Posts:
    37
    Hope extension method in your roadmap:
    upload_2018-4-8_17-22-37.png
    upload_2018-4-8_17-22-29.png
     
  15. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    Can you send me the prefab of both AbstractMB and Test for i can reproduce and fix the problem for the next update.

    Support to extension added to roadmap by looking using namespace on generation , thank you.
     
  16. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    uNode v1.4.3 has been submitted for review!

    changelog v1.4.3:
    -Now support nested StateMachine (State under State).
    -Now StateMachine can be grouped using GroupNode.
    -Added Split Node to split MultipurposeNode(deep member) into several node.
    -Added ParallelControl.cs used to execute node without waiting the node (only on State Graphs).
    -Added progress bar on generating script.
    -Improved GroupNode.
    -Improved StateNode.
    -Improved some of editor script.
    -Fixed ItemSelector when change the type of search some time make editor freeze.
    -Fixed ItemSelector not show uNode member on TransitionEvent component.
    -Fixed some gui bugs.
     

    Attached Files:

  17. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    uNode v1.4.3 has been released on the Asset store.
     
  18. 3d_Artist1987

    3d_Artist1987

    Joined:
    Jul 9, 2012
    Posts:
    707
    Hey,
    First thanks for making this powerful tool.
    How long you support this asset?
     
  19. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    I support it as long as I can.
     
    Mark_01 likes this.
  20. 3d_Artist1987

    3d_Artist1987

    Joined:
    Jul 9, 2012
    Posts:
    707
    Thanks
     
  21. Rixly239

    Rixly239

    Joined:
    Mar 31, 2014
    Posts:
    242
    Kudos on working on the documentation wahid, I like what you bring to the table. I hope others see your dedication. I'll support you with a purchase on pay day, 2 weeks away lol.

    3d_Artist, did u purchase? Interested in your take given you were invested in Nottourus.

    Rix
     
  22. 3d_Artist1987

    3d_Artist1987

    Joined:
    Jul 9, 2012
    Posts:
    707
    no, I didn't purchase uNode till yet.
     
  23. Lanslot

    Lanslot

    Joined:
    Nov 18, 2016
    Posts:
    37
    Hello @wahid_rachmawan
    Can you show me how to use GUILayout.Button
    i typed 'Button',but there are nothings what i need
     
  24. Rixly239

    Rixly239

    Joined:
    Mar 31, 2014
    Posts:
    242
    Wahid, your website hangs on the docs page. Been like that a couple of days.
     
  25. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    I have test the GUI, and i found a bug that the condition for running OnGUI function need to have OnMouseDown function.
    I have fix it, and will submit it on the asset store on sunday.

    What do you mean?
    do you mean the document page makes the browser hangs?
     
  26. Lanslot

    Lanslot

    Joined:
    Nov 18, 2016
    Posts:
    37
    Hello @wahid_rachmawan
    Please dont forget improve searchField.(auto focusing) to ensure smooth operation
    :)
     
  27. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    Hello everyone!

    Now i working to release the uNode 1.5 with some cool feature:
    -Creating NestedType(Class/Struct/Interfaces/Enum)
    -Creating new Enum type
    -Creating new Interfaces
    -More nodes to control Behavior Tree and StateMachine.
    -and if i have more time, uNode will support creating new indexer.

    The uNode 1.5 will be released a few weeks, hopefully not until a month:).
     
    Last edited: Apr 20, 2018
  28. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    Ok, thanks for the tips.
     
  29. Lanslot

    Lanslot

    Joined:
    Nov 18, 2016
    Posts:
    37
    upload_2018-4-20_16-44-52.png
    Can't connected??
     
  30. Lanslot

    Lanslot

    Joined:
    Nov 18, 2016
    Posts:
    37
    upload_2018-4-20_16-50-19.png
    If i wonder write code like above, what should i do?
     
  31. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    do you have error in your console?
    maybe try close uNodeEditor or restart unity

    I tried to find DoMove without any parameter and not found it.

    for code look like "(() => Debug.Log("Done"))" it can be generated using anonymous function node.
     
  32. Lanslot

    Lanslot

    Joined:
    Nov 18, 2016
    Posts:
    37
    Dotween's extension methods.
    Code (CSharp):
    1. Tweener tweener = this.transform.DOMove();
    2. tweener.OnComplete(()=>Debug.Log("Done"));
    upload_2018-4-20_17-1-46.png
    upload_2018-4-20_17-2-19.png
    upload_2018-4-20_17-3-41.png

    GIF.gif
    Cannot set a delegate.
     

    Attached Files:

  33. Lanslot

    Lanslot

    Joined:
    Nov 18, 2016
    Posts:
    37
    Sorry,GIF file is wrong. GIF1.gif
     
  34. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    To set on complete, right click on the onComplete and click on SetInstance, the problem is anonymous function is System.Action while the onComplete is TweenCallback so it can't connected to connect it i'll improve the anonymous function soon, the next update will be available.
     
  35. Lanslot

    Lanslot

    Joined:
    Nov 18, 2016
    Posts:
    37
    Wait new version!
    but i got trouble, i can't resovle it.
    GIF.gif
    No error, just normal message:
    Code (CSharp):
    1. Should not be capturing when there is a hotcontrol
    2. UnityEngine.GUI:Button(Rect, String, GUIStyle)
    3. MaxyGames.<>c__DisplayClass69_0:<DrawFlowConnection>b__1(Node) (at D:/My Project/uNode 2018/Assets/SourceCode/Editor/uNodeEditorUtility.cs:1815)
    4. MaxyGames.uNode.uNodeEditor:DrawWindow(Rect) (at D:/My Project/uNode 2018/Assets/SourceCode/Editor/uNodeEditor.cs:1492)
    5. MaxyGames.uNode.uNodeEditor:OnGUI() (at D:/My Project/uNode 2018/Assets/SourceCode/Editor/uNodeEditor.cs:513)
    6. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    7.  
     
  36. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    Can't connect because the overflow checking, i'll disable it for value pin in next update.

    The massage from console is not effect anything so leave it.
     
  37. Rixly239

    Rixly239

    Joined:
    Mar 31, 2014
    Posts:
    242
    Wahid_rachmawan, this is the update that puts you on the map. You then need to promote uNode on the Unity store similar to what Bolt is doing. Perhaps even a sale for a short time to get some people in through the door & get your forums active. This is the key to your success. Trust me, look at Nottorus for an example of how not to do things. Good luck...
     
  38. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    Thanks for the suggestion, soon when uNode have a good documentation and some of videos i'll promote it.
     
    Rixly239 and Mark_01 like this.
  39. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    uNode v1.4.4 has been submitted for review!

    changelog v1.4.4:
    -Added promote to local variable in input context menu.
    -Added store instance to variable in node context menu.
    -Added store instance to local variable in node context menu.
    -Added auto convert delegate type when assign, add, remove a delegate.
    -Removed Overflow checking for value pin.
    -Fixed error on generating local variable.
    -Fixed can't connect delegate type pin to delegate value when the type is not same.
    -Fixed CSharpParser bugs parsing parameter with ref/out keyword.
    -Fixed ItemSelector not show some item when you want to create new node from value pin.
    -Fixed some bugs.
     
    Mark_01 likes this.
  40. Lanslot

    Lanslot

    Joined:
    Nov 18, 2016
    Posts:
    37
    How to use Delegate?
     
  41. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    A animated gif to use delegate with DOTween:
    using delegates.gif

    C# Outputs:
    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using System.Collections.Generic;
    4.  
    5. public class Cube : MonoBehaviour {
    6.  
    7.     public void Start() {
    8.         DG.Tweening.Tweener variable0 = null;
    9.         variable0 = DG.Tweening.ShortcutExtensions.DORotate(this.GetComponent<Transform>(), new Vector3(0f, 0f, 5f), 2F, DG.Tweening.RotateMode.Fast);
    10.         variable0.onComplete = delegate() {
    11.             Debug.Log("Finish");
    12.         };
    13.     }
    14. }
    15.  
     
  42. Lanslot

    Lanslot

    Joined:
    Nov 18, 2016
    Posts:
    37
    Cool, Thx! :)
     
  43. Lanslot

    Lanslot

    Joined:
    Nov 18, 2016
    Posts:
    37
    upload_2018-4-26_14-53-29.png
    upload_2018-4-26_14-53-43.png
    Code (CSharp):
    1. Error on getting value of node:Node 4
    2. UnityEngine.Debug:LogError(Object, Object)
    3. MaxyGames.uNode.ValueNode:GetValue() (at D:/My Project/uNode/Assets/SourceCode/Core/AbstractClass.cs:856)
    4. MaxyGames.MemberData:Invoke(Object[]) (at D:/My Project/uNode/Assets/SourceCode/Core/MemberData.cs:1585)
    5. MaxyGames.MemberData:Get() (at D:/My Project/uNode/Assets/SourceCode/Core/MemberData.cs:1501)
    6. MaxyGames.MemberData:get_startTarget() (at D:/My Project/uNode/Assets/SourceCode/Core/MemberData.cs:180)
    7. MaxyGames.MemberData:GetMember() (at D:/My Project/uNode/Assets/SourceCode/Core/MemberData.cs:1016)
    8. MaxyGames.uNodeEditorUtility:DrawMultipurposeMember(MultipurposeMember, Node, Vector2) (at D:/My Project/uNode/Assets/SourceCode/Editor/uNodeEditorUtility.cs:1072)
    9. MaxyGames.uNode.uNodeUtils:DrawValueGetter(MultipurposeMember, Node, Vector2) (at D:/My Project/uNode/Assets/SourceCode/Core/uNode/uNodeUtils.cs:437)
    10. MaxyGames.uNode.MultipurposeNode:OnDrawNode() (at D:/My Project/uNode/Assets/SourceCode/Node/MultipurposeNode.cs:94)
    11. MaxyGames.uNode.uNodeEditor:DrawNodeWindow(Node) (at D:/My Project/uNode/Assets/SourceCode/Editor/uNodeEditor.cs:5750)
    12. MaxyGames.uNode.uNodeEditor:DrawNodeWindow(Int32) (at D:/My Project/uNode/Assets/SourceCode/Editor/uNodeEditor.cs:5221)
    13. UnityEditor.EditorWindow:EndWindows()
    14. MaxyGames.uNode.uNodeEditor:DrawWindow(Rect) (at D:/My Project/uNode/Assets/SourceCode/Editor/uNodeEditor.cs:1594)
    15. MaxyGames.uNode.uNodeEditor:OnGUI() (at D:/My Project/uNode/Assets/SourceCode/Editor/uNodeEditor.cs:508)
    16. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    17.  
    Code (CSharp):
    1. error on draw node:
    2. UnityEngine.Debug:Log(Object, Object)
    3. MaxyGames.uNode.uNodeEditor:DrawNodeWindow(Int32) (at D:/My Project/uNode/Assets/SourceCode/Editor/uNodeEditor.cs:5224)
    4. UnityEditor.EditorWindow:EndWindows()
    5. MaxyGames.uNode.uNodeEditor:DrawWindow(Rect) (at D:/My Project/uNode/Assets/SourceCode/Editor/uNodeEditor.cs:1594)
    6. MaxyGames.uNode.uNodeEditor:OnGUI() (at D:/My Project/uNode/Assets/SourceCode/Editor/uNodeEditor.cs:508)
    7. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    8.  
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. MaxyGames.MemberData.Invoke (System.Object[] value) (at D:/My Project/uNode/Assets/SourceCode/Core/MemberData.cs:1669)
    3. MaxyGames.MemberData.Get () (at D:/My Project/uNode/Assets/SourceCode/Core/MemberData.cs:1501)
    4. MaxyGames.MultipurposeMember.Get () (at D:/My Project/uNode/Assets/SourceCode/Core/MultipurposeMember.cs:45)
    5. MaxyGames.uNode.MultipurposeNode.Value () (at D:/My Project/uNode/Assets/SourceCode/Node/MultipurposeNode.cs:35)
    6. MaxyGames.uNode.ValueNode.GetValue () (at D:/My Project/uNode/Assets/SourceCode/Core/AbstractClass.cs:853)
    7. UnityEngine.Debug:LogException(Exception)
    8. MaxyGames.uNode.uNodeEditor:DrawNodeWindow(Int32) (at D:/My Project/uNode/Assets/SourceCode/Editor/uNodeEditor.cs:5225)
    9. UnityEditor.EditorWindow:EndWindows()
    10. MaxyGames.uNode.uNodeEditor:DrawWindow(Rect) (at D:/My Project/uNode/Assets/SourceCode/Editor/uNodeEditor.cs:1594)
    11. MaxyGames.uNode.uNodeEditor:OnGUI() (at D:/My Project/uNode/Assets/SourceCode/Editor/uNodeEditor.cs:508)
    12. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    13.  
    Unity 2017.3.0f3
     
  44. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    What happen?
     
    Last edited: Apr 26, 2018
  45. Lanslot

    Lanslot

    Joined:
    Nov 18, 2016
    Posts:
    37
    I just complie this graph,and attach to an cube, hit Play.
    The above error occurred..
    so i try to restart unity, re-play this scene, error message is gone.
    but when i play this scene again, error message is back..
     
  46. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    So the error happen after you compile it?

    Can you send me the prefab for i can reproduce it
     
  47. Lanslot

    Lanslot

    Joined:
    Nov 18, 2016
    Posts:
    37
    this is prefab.
     

    Attached Files:

  48. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    I'll check it after I get home, now I'm out of town.
    about 3 days I arrived home.
     
  49. Lanslot

    Lanslot

    Joined:
    Nov 18, 2016
    Posts:
    37
    Please forget about the tedious work and have a good trip.
     
  50. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    I have test it by compile and play it and no error show up, i test using unity 5.6 and 2018.1b2
    but from the reported error i made some improvement to prevent such errors in the editor.