Search Unity

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

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

  1. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    Please send me the screenshot and the output script.
     
  2. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    276
    2018-12-23_18-15-24.png
     

    Attached Files:

  3. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    The output is correct, condition will be inverted so it same like else after the condition false. just try to play it;).
     
  4. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    276
    @wahid_rachmawan
    Ok, I'm sorry - my mistake.
    So... now the most important to repair (for me) are the issues from posts 321, 325 and 337.
     
  5. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    All of those bugs has been fixed;).

    Thank you for reporting the bugs.
     
    AthrunVLokiz likes this.
  6. wahid_rachmawan

    wahid_rachmawan

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

    changelog v1.7.3:
    -New uNode Hierarchy.
    -Improved CSharpGenerator
    -Improved CSharpPreviewWindow
    -Improved Editor
    -Improved ErrorChecker
    -Reorganize and restructure core scripts.
    -Removed legacy network event on uNodeRuntime which aren't work anymore on Unity 2018.3.
    -Fixed bugs uNode Runtime won't run.
    -Fixed bugs editor red text on Unity 2018.3.
    -Fixed bugs error on editing Struct type.
    -Fixed some bugs.


    Download here : http://maxygames.com/download/

    New uNode Hierachy window:
    Screenshot (260).png
    This feature are currently in preview, this window will display flow nodes in tree view instead of graphs and able to edit selected variable, property, function and nodes.
    In the future this feature will have searching, manage nodes, adding nodes, function, properties and even editing a whole graphs.
     
    Last edited: Dec 24, 2018
  7. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    276
    Thank you for a nice holiday gift. :)
     
  8. AthrunVLokiz

    AthrunVLokiz

    Joined:
    Jun 7, 2017
    Posts:
    32
    Hello, @wahid_rachmawan

    Physics(3D) methods work, But Physics2D methods not work. such as Raycast, Boxcast
    upload_2018-12-27_17-48-15.png

    This is an issue or not yet support or my mistake?

    *Unity 2018.2.20f1
    *uNodeRuntime

    Thanks :)
     
  9. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    Can you send me the graph file and reproduction steps?
     
  10. AthrunVLokiz

    AthrunVLokiz

    Joined:
    Jun 7, 2017
    Posts:
    32
    I don't know how to save graph data to the asset file(I try to Export>Export to Asset but nothing happen)

    This is graphs In uNodeRuntime's "Update" Method.
    upload_2018-12-27_19-24-2.png
    Reproduction
    -New Scene > Create Ground(with collider)
    -Create uNodeRuntime GameObject and set those graphs like the image above.

    Please tell me if you want more information, Thanks :)
     
  11. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    276
    @wahid_rachmawan
    During the holidays I worked on the project - from today I check the new version of uNode.

    First note - in the functions where I have loops, problematic private variables still arise. :(
     
  12. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    276
    Parse error --->

    I have three scripts:

    Code (CSharp):
    1. using UnityEngine;
    2.  
    3. public class Script_0 : MonoBehaviour
    4. {
    5.     public static Script_0 Self;
    6.     public Script_1 VAR_script_1;
    7.  
    8.     public static Script_1 prop_VAR_script_1
    9.     {
    10.         get
    11.         {
    12.             return Self.VAR_script_1;
    13.         }
    14.     }
    15.  
    16.     public void Awake()
    17.     {
    18.         Self = this;
    19.     }
    20. }
    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections.Generic;
    3.  
    4. public class Script_1 : MonoBehaviour
    5. {
    6.     public List<int> List_int = new List<int>();
    7. }
    Code (CSharp):
    1. using UnityEngine;
    2.  
    3. public class Script_2 : MonoBehaviour
    4. {
    5.     public int Var_int = 0;
    6.  
    7.     public void NewFunction()
    8.     {
    9.         Var_int = Script_0.prop_VAR_script_1.List_int[2];
    10.     }
    11. }
    Parses the third --->
    błąd parsowania 003.png

    Error applies only to parsing - because the editor is ok --->
    błąd parsowania 003 a.png
     
  13. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    It seem uNode fail to convert RaycastHit2D into bool value.
    You can fix it by manually convert it to bool like this:
    Screenshot (261).png

    Thanks for report it.
    Ah this is weird i think in some condition the bug still comes, i will investigate and fix it soon.
    Alternative you can use script i attach below to force skip local variable (this will not work on state machine), the output c# will like normal foreach loop in any condition.
    This will be fixed soon, Thanks for report it..
     

    Attached Files:

    AthrunVLokiz likes this.
  14. AthrunVLokiz

    AthrunVLokiz

    Joined:
    Jun 7, 2017
    Posts:
    32
    :eek:Oh! That's a good idea. Thanks :)
     
  15. AthrunVLokiz

    AthrunVLokiz

    Joined:
    Jun 7, 2017
    Posts:
    32
    @wahid_rachmawan I have another question.

    For uNodeRuntime, How to keep a node graph which changes(in play mode) when back to edit mode?

    Thanks :)
     
  16. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    Simple, drag & drop GameObject from the hierarchy to project (make new or replace existing prefab).
     
    AthrunVLokiz likes this.
  17. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    276
    @wahid_rachmawan
    Weird error:
    After subsequent launches of the Unity editor - in the uNode editor I have strange things --->
    ERROR 002 a.png
    I do not have scripts with these names. Some of them are names of other elements in project, but there are some that I see for first time (eg: "Inventory_Bullet")
    After selecting them, sometimes they disappear, sometimes nothing happens, and sometimes something else + errors in console --->
    ERROR 002 b.png
    After closing them and cleaning the console, everything seems to work well, but I think that such things should not happen.
     
    Last edited: Dec 29, 2018
  18. HypnotistDK

    HypnotistDK

    Joined:
    Feb 14, 2016
    Posts:
    2
    @Szaruga I haven't decided if my next asset will be unode, what do you think about unode? Is it usable at this stage?

    Do bolt or others have a brighter future
     
  19. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    276
    @HypnotistDK
    I think that uNode is the best visual scripts in the Asset Store at the moment.
    But...
    This is my opinion, mainly due to my needs, yours may be different and uNode may be inappropriate for You.
     
  20. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    Currently this bug i couldn't fix it, i have try to check null before access it but this still happened.
    This error won't effect uNode, i still try to fix it and hope it will be fixed soon.
     
  21. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    276
    In a few other cases, sometimes there are some garbage, etc. This does not affect the operation of the game, because it finally works on C # scripts. But it is disturbing

    Meanwhile...
    ERROR 003.png
    The function parameters have unnecessary restrictions.
     
  22. AthrunVLokiz

    AthrunVLokiz

    Joined:
    Jun 7, 2017
    Posts:
    32
    I think that is an issue and slow down workflow.

    For C# Overloading in Search system (I mean class or method... which the same name and many parameters such as Physics.Raycast). Text in preview can't show different of them. Can you fix it?

    My recommend is fix it by tooltip system (mouse hover on text preview then spread all text) or your solution.

    I am very happy with uNode 1.7.3
    Thanks :)
     
  23. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    What do you mean with the parameter have unnecessary restrictions?
    How should it be?

    Oh for that you can hover your mouse to the icon aside text and you will see tooltip information about the c# member.
    But the system look bad so i decide to improve it again. I think your solution is perfect, i will improve it soon.

    Thanks.
     
    AthrunVLokiz likes this.
  24. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    276
    I meant that when adding a node, they don't have the "->" button that variables have, which allows accessing their members without using additional nodes.
     
  25. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    Currently parameters not supported it at the moment, you can use reflection nodes to do it and connect the instance to the parameter node which produces 2 nodes.
    It will be supported in the future.
     
  26. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    276
    @wahid_rachmawan
    Parsing error --->
    I have script:
    Code (CSharp):
    1. using UnityEngine;
    2. using UnityEngine.UI;
    3.  
    4. public class Script_2 : MonoBehaviour
    5. {
    6.     public Image Variable;
    7.  
    8.     public void NewFunction()
    9.     {
    10.         Variable.rectTransform.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, 50F);
    11.     }
    12. }
    After parsing, I have an error that prevents compilation --->
    ERROR 004 a.png

    Of course, it's easy to fix it --->
    ERROR 004 b.png
    but an error is an error ;)
     
    Last edited: Jan 4, 2019
  27. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    It will be fixed soon.

    Thanks for report it.
     
  28. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    276
    @wahid_rachmawan
    I have a few comments about the themes, for example:
    2019-01-04_20-28-53.png 2019-01-04_20-30-16.png 2019-01-04_20-31-10.png

    Perhaps the reason is that I'm working in resolution 3840x2160.
    If so, do you have any advice for this?

    Anyway, it would be nice if could create own themes, individually choosing the colors of each element - including backgrounds under the grid.
     
  29. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    Sorry for late answer.

    I am not sure about this but you can change the node style in the theme assets located in 'Assets/uNode/Editor/Resources/Theme/DarkTheme/_Theme.asset'
    • Select the theme asset
    • In inspector find 'Default Node Style' > 'Node Style'
    • And change Text Clipping to 'Overflow'
    Screenshot (264).png
    It will show the hidden text but with some bad style (will be fixed in upcoming update).

    For the custom theme you can add it by duplicating 'DarkTheme' or 'LightTheme' and customize it like what you want but the customization is still limited, i still improving it.
     
    Szaruga likes this.
  30. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    276
    Ok, thanks. Nice message that you still improving it.:)

    There is something else:
    2019-01-06_16-46-41.png 2019-01-06_16-47-45.png 2019-01-06_16-48-38.png
    I usually work at zoom = 1, but ... ;)

    However, there is something that bothers more. --->
    2019-01-06_17-30-16.png
    "Popup window" it is sometimes shown in strange places, the same happens with:
    2019-01-06_17-17-10.png
    and I have to look for it on the screen.
     
    Last edited: Jan 6, 2019
    AthrunVLokiz likes this.
  31. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    The tooltip bug i couldn't fix at the moment.

    For the popup bug, in my screen it work on the right places even with any zoom level.
    How do you open the popup window?
     
  32. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    276

    Attached Files:

  33. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    Mark_01 likes this.
  34. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    276
    @wahid_rachmawan
    Changes to the prefabs in version 2018.3 caused some difficulties:
    I'm opening the first prefab --->
    006 b.png
    I want to open a second one --->
    006 c.png
    Unfortunately, at the moment the first one closes --->
    006 d.png
    I can put prefabs on the scene and then I can open all simultaneously - but there are errors --->
    006 e.png

    Anyway, I would like to work in open more than one script in the uNode editor, without having to put them on scene - because I do not put uNode scripts on the scene. I put only C # scripts on the scene.

    Is there any hope that it will be possible in Unity versions higher than 2018.2.x?
     
  35. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    Sure the next update will support multiple editing uNode for the new prefab system but you'll need to hit 'Save' button to save it (in future update i will make it automatic).

    And the upcoming update will have new GraphAsset which will save uNode graph with its nested graph into one '.asset' file instead of prefab so it can be edited simultaneously for Unity 2018.3 the limitation is the needed of hit 'Save' button to save and doesn't support run in editor mean only for c# generation (will be supported in future update).

    This error have been fixed in upcoming update.
     
    Szaruga and Mark_01 like this.
  36. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    276
    Ok. Thanks.
    Regarding the problem in post 367.
    These garbage are created after turning on the Unity - in the case where previously I turned off with open uNode scripts.
    By the way, I have a suggestion. It would be nice if uNode automatically saved previously opened scripts and after reboot - he loaded automatically, something like this --->
    2019-01-11_17-11-53.png
     
    Last edited: Jan 11, 2019
  37. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    Ah sure i will add it soon;).
     
    Szaruga likes this.
  38. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    276
    @wahid_rachmawan
    I'm trying to set my own theme ...
    2019-01-12_17-17-29.png 2019-01-12_17-19-48.png

    I do not know how to do some things, eg:
    2019-01-12_17-30-13.png 2019-01-12_17-32-09.png

    By the way...
    Nodes connected to a constructor are semi-transparent, as if unconnected. --->
    2019-01-12_17-34-38.png
     
  39. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    Its bug in theme script, will be fixed soon.

    This too will be fixed.

    Thanks for report it.

    btw your theme looking good.
     
    Mark_01 and Szaruga like this.
  40. Davood_Kharmanzar

    Davood_Kharmanzar

    Joined:
    Sep 20, 2017
    Posts:
    274
    @wahid_rachmawan
    hello,
    is it possible to creating Quest - Tutorial system with uNode?
    does exists as example?
    thanks.
     
  41. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    Hello,`
    uNode can do anything from the game logic to editor extension however as uNode mainly build for make anything like other visual scripting tools you'll need to build your own quest manager for examples.
    The good think in uNode is that you don't need to do it from scratch, you can find an c# script in the internet and convert it to uNode with the C# Parser (you can also use this to learn how uNode work).

    Currently uNode doesn't have an example for quest system.

    Thanks for interest in uNode.
     
    Mark_01 likes this.
  42. wahid_rachmawan

    wahid_rachmawan

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

    changelog v1.7.4:
    -New command popup allow for find type or adding nodes.
    -New GraphAsset, allow saving uNode Graph in a .asset file (ScriptableObject).
    -Improved CSharpGenerator
    -Improved Editor
    -Improved compatibility for Unity 2018.3
    -Added support to edit uNode (prefab) for the new prefab system.
    -Fixed bugs parsing enum values when enum type is within a class.
    -Fixed bugs parsing invoke field delegate.
    -Fixed bugs parsing Nullable<T> types.
    -Fixed bugs parsing nullable types (bool?, float?, int?, etc).
    -Fixed bugs error on generate nodes get/set properties.
    -Fixed bugs error on generate SetValue node with null value.
    -Fixed some bugs on Unity 2018.3
    -Fixed editor bugs initializer node always dimmed.
    -Fixed some bugs.

    Download here : http://maxygames.com/download/
     
  43. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    uNode v1.7.4 has been released on the Asset store.
     
  44. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    276
    @wahid_rachmawan
    It is a very positive feeling that the tool I use, again and again is getting better, thank You. :)

    I noticed that there are still some problems in Unity 2018.3.1.
    As soon as I find time, I will try to present them.

    P.S.
    I do not know if you have forgotten, so just in case I remind you that the error from post 362 still exists.
     
    Mark_01 likes this.
  45. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    I still trying to fix it, i was unable to fix it for the 1.7.4 update.

    Edit: To fix it just comment or remove CSharpParser on line 2894 'members.RemoveAt(members.Count - 1);'
     
    Last edited: Jan 15, 2019
    Mark_01 likes this.
  46. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    276
    Ok

    2019-01-15_17-13-06a.png
    A possibility to set both the appearance and distance?

    P.S.
    I would like sometime to parsing some scripts, are you interested in reports with possible errors?
     
  47. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    For now only appearance for custom theme named 'Header Style' but if someone interest for change the distance i will add it;).

    Oh sure i interest in it, the main reason is to make it stable enough for i can begin creating new feature called C# Sync this feature allow of editing generated c# and it will be synced with uNode without recreating nodes from scratch.
    It would be cool if uNode have it, cause programmer can write code and designer can design the graph so it would be very useful for team up.
    This feature is the most complex thing for me and i guess there is no one visual scripting have it.
    But before begin creating it i need very stable c# parser.
    Hope in 2019 i have released the beta version of that features.
     
    AthrunVLokiz and Mark_01 like this.
  48. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    276
    Such things should be optional to choose from. I am interested in every free space, that's why I dream about things like: 2019-01-15_19-59-00.png and --->
    https://forum.unity.com/threads/xnode-a-general-purpose-node-editor.502354/#post-3448453

    P.S.
    Recently I tried to parse my friend's files and there were errors - but for now I'm busy with other things, but I would like to take care of it.
     
  49. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    345
    You can try to made theme look like that by minimizing 'Left Pin Spacing' and 'Right Pin Spacing' and toggle 'Pin In Front Of Node' the pin should look like that.

    Ah i have forgotten this feature (not add on my plan), this feature will available soon.
     
  50. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    276
    I know ;) but that's not enough.
    2019-01-16_12-11-41.png
    For me, value connection should look like flow connection. It's best if it was optional, so that every user would have a choice.
    Reroutings is great feature :rolleyes:

    2019-01-16_12-24-36.png Thanks for this option :) but It would be good if it memorized the most recently opened access path (usually the most often)


    This icon is probably misleading ;) --->
    2019-01-16_12-30-21.png
    But it's just a trifle

    P.S.
    I am still working with version 2018.2.x but maybe today I will move the project to 2018.3.1 and I will let you know about any problems
     
    Last edited: Jan 16, 2019