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:
    346
    Its cooming in this weeks;);).
     
    captnhanky, AthrunVLokiz and Szaruga like this.
  2. captnhanky

    captnhanky

    Joined:
    Dec 31, 2015
    Posts:
    89
    Hi!
    I have little problem (I am still a noob ;) )
    I parsed a script that is working (touch control) but after parsing it is not working anymore.
    The error is:
    ArgumentException: Object of type 'UnityEngine.Vector2' cannot be converted to type 'UnityEngine.Vector3'.

    The script is:

    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;

    public class fingermove : MonoBehaviour
    {

    private Vector3 touchposition;
    private Rigidbody2D rb;
    private Vector3 direction;
    private float moveSpeed = 20f;

    // Start is called before the first frame update
    void Start()
    {
    rb = GetComponent<Rigidbody2D>();
    }

    // Update is called once per frame
    void Update()
    {
    if (Input.touchCount>0)
    {
    Touch touch = Input.GetTouch(0);
    touchposition = Camera.main.ScreenToWorldPoint(touch.position);
    touchposition.z = 0;
    direction = (touchposition - transform.position);
    rb.velocity = new Vector2(direction.x, direction.y) * moveSpeed;

    if (touch.phase == TouchPhase.Ended) rb.velocity = Vector2.zero;
    }
    }
    }

    and the uNode Error is here:
    Vector2 Error.png

    touch.position is a vector2 but touchposition is a vector3

    Can anybody explain to me please why this does work as a script but not in uNode?

    Thanks!
     
  3. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    346
    It seem the implicit operator doesn't work when set variable value, it will be fixed in next update.
    Thanks for report.
     
  4. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    346
    Hey everyone the new update has released its currently is in BETA version (because some new features is not stable enough and some features still in development).
    BETA version will not submitted to the Asset Store.
    This version comes with new cool features such as:

    -Event Sheet inspired by construct 2 event sheet.
    This allow creating easily creating game logic by drag & drop object to create event, condition and action.
    Also this features support full reflection system just like regular node based system.
    I think this features will be great for non programmer, as it more easy for beginner.

    See how it work:

    Screenshot (279).png
    You can create more complex stuff as it support nested condition, and looping (nested event coming soon).
    Its currently doesn't have c# generation this still in WIP and will available before the stable version out.

    -C# Format to format generated script.
    Before formatting:
    Screenshot (277).png
    After formatting:
    Screenshot (278).png

    -Auto Convert incorrect pin.


    -Control Point to control the wire/connection.


    changelog v1.8b1:
    -New EventSheet feature [BETA].
    -Added C# Format features.
    -Added Control Point features.
    -Added Auto Convert value pin features, triggered on type from source pin is not match with type from target pin when making connection.
    -Added auto save graph (asset or prefab) on compile, preview c# script, and on closing Unity Editor.
    -Improved C# Parser
    -Improved Editor
    -Improved ErrorChecker
    -Improved ItemSelector
    -Fixed bugs when parsing c# script makes unity crash due to stack overflow.
    -Fixed bugs parsing for loop when using loop index from variable, or property.
    -Fixed bugs item not being sorted in ItemSelector.
    -Fixed bugs editor not refreshed on adding constructor.
    -Fixed bugs editor not refreshed on adding property.
    -Fixed bugs implicit operator doesn't work on set variable values.
    -Fixed some editor bugs.

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

    sledgeman

    Joined:
    Jun 23, 2014
    Posts:
    372
    Event Sheet looks really interesting ! This means you don´t need to deal with nodes, if you want ?! And can you combine these two methods ? ... ah, i bought construct2 years ago, and i felt in love with its "event sheet system" :) . The only downside was: no complex coding was allowed.
     
  6. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    346
    Yes you can, as it not node based system, making complex stuff is hard and limited due to how it works but you can combine it with uNode node system as it support full reflection system. You create c# script from uNode then do high level stuff in Event Sheet.
     
  7. AthrunVLokiz

    AthrunVLokiz

    Joined:
    Jun 7, 2017
    Posts:
    32
    Just import uNode v1.8b1 in to unity 2018.2.20f1

    [Edit]When import CSharpParser
    [Edit2]in unity 2018.3.5f1 too
    Assets/uNode/C# Parser/Editor/CSharpParser.cs(803,28): error CS1061: Type `MaxyGames.uNode.GroupNode' does not contain a definition for `GetVariable' and no extension method `GetVariable' of type `MaxyGames.uNode.GroupNode' could be found. Are you missing an assembly reference?
     
    Last edited: Feb 18, 2019
  8. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    346
    Sorry i forgot to export newer C# Parser, i just reupload it.
    You can download again to fix it.
     
    AthrunVLokiz likes this.
  9. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    278
  10. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    278
    Last edited: Feb 21, 2019
  11. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    278
    @wahid_rachmawan
    I have some questions and suggestions about the Control Points:

    1. How do I make the connection look like this?
    2019-02-21_19-59-57.png
    When I try to do it myself, it looks like this:
    2019-02-21_20-04-56.png

    2. When I select multiple nodes, the Control Points should get selected too, and move with them.

    3. Would it be possible to divide the data into multiple lines, like this? --->
    2019-02-21_20-17-28.png

    4. Would it be possible to add points while creating a connection, like this? --->
    2018-04-01_21-38-05.gif

    Thanks
     
  12. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    346
    Will be fixed ASAP.

    Can you send me the full error stack?

    Direct edit in nodes only available on native theme, edit in nodes for custom theme replaced with button which show the edit popup after click it.

    Ah i think has made something wrong before release it, i'll investigate and fix it soon.

    This will implemented soon.

    Its impossible for now since the control point is serialized inside the pin.

    This something i have consider before, this will be implemented soon.

    Thanks for reports and suggestions.
     
    Lars-Steenhoff likes this.
  13. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    278
  14. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    346
  15. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    278
    Ok... I have a script --->
    Code (CSharp):
    1. using UnityEngine;
    2.  
    3. public class Script_001 : MonoBehaviour
    4. {
    5.     public int Allocation = 0;
    6.     public int Limit = 0;
    7.     public bool Used = false;
    8.     public void Function_001()
    9.     {
    10.         switch (Allocation)
    11.         {
    12.             case 0:
    13.             {
    14.                 if (Used)
    15.                 {
    16.                     Limit = 10;
    17.                 }
    18.                 else
    19.                 {
    20.                     Limit = 20;
    21.                 }
    22.  
    23.                 Function_002();
    24.             }
    25.  
    26.                 break;
    27.             case 1:
    28.             {
    29.                 Limit = 5;
    30.                 Function_002();
    31.             }
    32.  
    33.                 break;
    34.             case 2:
    35.             {
    36.                 Limit = 100;
    37.                 Function_002();
    38.             }
    39.  
    40.                 break;
    41.         }
    42.     }
    43.  
    44.     public void Function_002()
    45.     {
    46.     }
    47. }
    And here the result of parsing this script --->
    2019-02-23_13-24-05.png .......
    Would it be possible to give one's own names to the Action nodes?
    .......
    Would it be possible to place the NEXT output at the bottom where, in addition to the NEXT output, there are other outputs (as in loops and switches)?
    I think it would be more intuitive and clear - because the order of execution is from top to bottom.
    like this --->
    2019-02-23_13-29-39.png
     
  16. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    346
    For unconnected function it will be fixed soon, for break node i can't fix it for now you can remove it manually.

    You can rename it by double click the title on the inspector.
    Screenshot (280).png

    Sure, i'll change it soon.

    Thanks.
     
    Mark_01 and Szaruga like this.
  17. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    278
    @wahid_rachmawan
    When I access a member of a local variable within a node, I get an error. --->
    e_006A.png
    It doesn't happen when I use a separate node. --->
    e_006B.png
     
  18. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    346
    Try to reassign it, i thing the reference is missing, because in my its works.
     
  19. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    278
    It doesn't help - there are still error and I have so in many other similar situations in different scripts.

    This should probably change automatically - just like in a separate node? --->
    2019-02-23_16-38-06.png
     
    Last edited: Feb 23, 2019
  20. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    346
    Its bug on the ItemSelector when selecting local variable the instance is not assigned correctly, it will be fixed in next update.
     
    Szaruga likes this.
  21. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    278
    @wahid_rachmawan
    As for the Event Sheet...
    What is the main purpose of this tool? What are its greatest possibilities and limitations? what was your goal creating it?
    (Is there a chance for some documentation or something similar?)
     
  22. sledgeman

    sledgeman

    Joined:
    Jun 23, 2014
    Posts:
    372
    I am excited about "Event Sheets". I think they can co-exist with the node-system, or better say, you can combine them. I would say it is similar to the Unity addOn "GameFlow", if you know it. I have this one , too. It is really simple and "fast"! I also think, it could help you to get a better overview (like when you coding in your IDE). Nodes can become messy. One thing i like in text-editors / IDEs, you can use the "search" on everything. This is barley possible with nodes. So i would wish such features will be somehow possible with such a "Event Sheet". As always, the Dev. know it best ... ;)
     
    Szaruga likes this.
  23. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    346
    The main purpose is to bring non programmer the easier way to creating game event as it more simple and ease of use.
    I thing the greatest possibilities is you can control game event by only creating one Event Sheet.
    The limitation of this tools is the features itself, as it designed to be simple creating complex task will be hard or impossible with this tools you'll need the node based system to do it but this limitation can be removed/reduced by combining it with the node system.

    My goal by creating Event Sheet is to make uNode the most complete visual scripting tools for creating a games in Unity.
     
    Mark_01 and Szaruga like this.
  24. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    278
    Last edited: Feb 26, 2019
  25. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    346
    Ah i almost forgot it, thanks for remind me.
    I am still working on creating new theme using new UIElement and the result was great.
    Bellow some picture about the upcoming theme :
    Screenshot (285).png
    Screenshot (286).png
    Its still far from completes, but i thing it has looking good as the flow node is vertical.

    For now yes it slow as it using reflection system, but as far you only use it for manage event like triggering it will be okay and as i mention before the stable version of Event Sheet will have c# generation just like node based.
     
  26. sledgeman

    sledgeman

    Joined:
    Jun 23, 2014
    Posts:
    372
    Wow ... the new theme looks fantastic. You put much love into it ;). I like the new node design & the wire-design. It feels more simple, with better overview. And the dark mode, is pretty good when working in the nights ...
     
  27. AthrunVLokiz

    AthrunVLokiz

    Joined:
    Jun 7, 2017
    Posts:
    32
    @wahid_rachmawan
    Can you improve elements of class variables or class functions(I mean left side in uNode Editor) to reorderable by drag&drop?

    and Can I use the current regular theme then switch to a new theme OR new theme are the replacement of regular theme? I afraid this will corrupt in my exist uNode Data. and I see the new one didn't show parameters such as "Input.GetButtonDown" node I can't see what key string you want to check(I guess it shows in inspector right side). But for me, this hard to debug.

    Thanks for the support, and sorry for my English.

    P.S. I like your idea about "Next" connector position. :)
     
  28. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    278
    It looks good, a bit similar to that ;) --->
    2018-12-17_21-39-31.png

    First suggestions:
    Nods seems too big and empty, I think it would be better if these elements were in the inside --->
    2019-02-27_08-26-00.png

    However - now you have no competition in the class of generating pure C # code. :)

    P.S.
    When is the new version released? :rolleyes:
     
    Mark_01 likes this.
  29. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    346
    Thanks.

    Sure i will implement it soon, thanks for suggest it.

    No the new theme is a new graph system, its different from the original graph and its required U2018.3 and it will be included in unitypackage files for compatibility reason with older unity version.

    The reflection nodes doesn't show the parameter such as string in "Input.GetButtonDown" because the editor for reflection nodes still not implemented yet, i still working on it. Don't worry new theme will not break anything you have because its just another theme.

    Yes its a bit similar to that, in the future i plan to make action node to be expanded in the node just like block in image above.

    This something i still consider before, but i thing better to make it like that and place the label inside node which is more good i think.
    I made a button because i still not implement an editor to edit the values, after implementing editor it will quite be more great.
    Thanks.

    Not sure when it be released but once the new theme is good enough to try i will release it.
     
    Mark_01, Szaruga and AthrunVLokiz like this.
  30. DavidLe360

    DavidLe360

    Joined:
    Dec 24, 2018
    Posts:
    21
    Hi, First of all, sorry if my english is not that good :)

    I am new with Unity and this is my first asset purchase, after long researches. I think this asset gonna help me alot, so i buy it. It has good features that other Visual Scripting don't have. I'm so excited to jump on it :):).

    But, I got and "NullReferenceException" error at my first test. The parse file is a generated tho. Here what i did and the full error message :

    Unity version: 2018.3.6f1

    ---- What i did:
    I use the 'From File' option to load an .cs file. the location of that .cs file is in Assets/Editor/MouseDown_EventInScene.cs

    ---- Error:
    NullReferenceException: Object reference not set to an instance of an object
    MaxyGames.uNode.Editors.CSharpParser.GetMembersDataFromExpression (Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax expression, MaxyGames.uNode.Editors.ParserSetting setting, System.Collections.Generic.List`1[MaxyGames.MemberData]& parameterValues, MaxyGames.uNode.ValueData& initializers) (at Assets/uNode/C# Parser/Editor/CSharpParser.cs:2522)
    MaxyGames.uNode.Editors.CSharpParser.GetMemberFromExpression (Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax expression, MaxyGames.uNode.Editors.ParserSetting setting, System.Collections.Generic.List`1[MaxyGames.MemberData]& parameterValues, MaxyGames.uNode.ValueData& initializers) (at Assets/uNode/C# Parser/Editor/CSharpParser.cs:1260)
    MaxyGames.uNode.Editors.CSharpParser.GetMemberFromExpression (Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax expression, MaxyGames.uNode.Editors.ParserSetting setting, System.Collections.Generic.List`1[MaxyGames.MemberData]& parameterValues) (at Assets/uNode/C# Parser/Editor/CSharpParser.cs:1248)
    MaxyGames.uNode.Editors.InvokeExpressionHandles.StatementHandler (Microsoft.CodeAnalysis.CSharp.Syntax.StatementSyntax syntax, MaxyGames.uNode.Editors.ParserData data, MaxyGames.uNode.Editors.ParserResult& result) (at Assets/uNode/C# Parser/Editor/SyntaxHandler.cs:422)
    MaxyGames.uNode.Editors.CSharpParser.ParseStatement (System.Collections.Generic.IEnumerable`1[T] syntaxs, Microsoft.CodeAnalysis.SemanticModel model, MaxyGames.uNode.uNodeRoot root, UnityEngine.Component parent, System.Collections.Generic.List`1[MaxyGames.uNode.Editors.ParserResult]& parserResult) (at Assets/uNode/C# Parser/Editor/CSharpParser.cs:1735)
    MaxyGames.uNode.Editors.BlockExpressionHandles.StatementHandler (Microsoft.CodeAnalysis.CSharp.Syntax.StatementSyntax syntax, MaxyGames.uNode.Editors.ParserData data, MaxyGames.uNode.Editors.ParserResult& result) (at Assets/uNode/C# Parser/Editor/SyntaxHandler.cs:1069)
    MaxyGames.uNode.Editors.CSharpParser.ParseStatement (Microsoft.CodeAnalysis.CSharp.Syntax.StatementSyntax syntax, Microsoft.CodeAnalysis.SemanticModel model, MaxyGames.uNode.uNodeRoot root, UnityEngine.Component parent, MaxyGames.uNode.Editors.ParserResult& parserResult) (at Assets/uNode/C# Parser/Editor/CSharpParser.cs:1673)
    MaxyGames.uNode.Editors.CSharpParser.ParseStatement (Microsoft.CodeAnalysis.CSharp.Syntax.StatementSyntax syntax, Microsoft.CodeAnalysis.SemanticModel model, MaxyGames.uNode.uNodeRoot root, UnityEngine.Component parent) (at Assets/uNode/C# Parser/Editor/CSharpParser.cs:1648)
    MaxyGames.uNode.Editors.CSharpParser.ParseSyntax (Microsoft.CodeAnalysis.CSharp.Syntax.CompilationUnitSyntax syntax, Microsoft.CodeAnalysis.SemanticModel model, UnityEngine.GameObject gameObject) (at Assets/uNode/C# Parser/Editor/CSharpParser.cs:255)
    MaxyGames.uNode.Editors.CSharpParser.StartParse (System.String script, UnityEngine.GameObject gameObject, System.Boolean reset) (at Assets/uNode/C# Parser/Editor/CSharpParser.cs:191)
    MaxyGames.uNode.Editors.CSharpParser.StartParse (System.String script, System.String objectName, System.Boolean reset) (at Assets/uNode/C# Parser/Editor/CSharpParser.cs:145)
    MaxyGames.uNode.Editors.CSharpParserWindow.OnGUI () (at Assets/uNode/C# Parser/Editor/CSharpParserWindow.cs:181)
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
    UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:342)
    UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:336)
    UnityEditor.HostView.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:129)
    UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:266)
    UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:438)
    UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:421)
    UnityEngine.Experimental.UIElements.IMGUIContainer.HandleEvent (UnityEngine.Experimental.UIElements.EventBase evt) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:401)
    UnityEngine.Experimental.UIElements.EventDispatcher.ProcessEvent (UnityEngine.Experimental.UIElements.EventBase evt, UnityEngine.Experimental.UIElements.IPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:511)
    UnityEngine.Experimental.UIElements.EventDispatcher.Dispatch (UnityEngine.Experimental.UIElements.EventBase evt, UnityEngine.Experimental.UIElements.IPanel panel, UnityEngine.Experimental.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:307)
    UnityEngine.Experimental.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.Experimental.UIElements.EventBase e, UnityEngine.Experimental.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/Panel.cs:176)
    UnityEngine.Experimental.UIElements.UIElementsUtility.DoDispatch (UnityEngine.Experimental.UIElements.BaseVisualElementPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:245)
    UnityEngine.Experimental.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:68)
    UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)

    ----------

    Thanks in advance.
     
    Last edited: Mar 1, 2019
  31. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    346
    Hi,

    First thanks for buy uNode.
    Parsing 'from file' is only for parsing script that does't have dependencies with other script so its only suitable for simpe script. Please try to use 'from monoscript' its very recommend.
     
  32. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    278
    @wahid_rachmawan
    Where is node Return in selector window? :confused:
    2019-03-01_16-57-27.png
    I can't find and I have to copy from old functions.
     
  33. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    278
    @wahid_rachmawan
    There are problems with parsing this code, which involves a delegate (btw what's an "AnonymousFunction"?)
    Also, doing something like this in uNode doesn't seem to be possible either.
     

    Attached Files:

  34. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    346
    Screenshot (288).png
    Its should be there, but if its confusing i'll move to context menu.

    I'll investigate and fix it, the anonymous function is a node to make a delegates.
    Its possible in uNode the body just not assigned, it should like this:
    Screenshot (289).png
     
  35. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    278
    But this is it o_O --->
    2019-03-02_18-15-38.png
    I need it --->
    2019-03-02_18-16-29.png
     
  36. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    346
  37. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    278
    @wahid_rachmawan
    How do I create a return node in the anonymous function that has the correct return type? Also, would it be possible to just use a function as delegate? It would make things much easier.
     
  38. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    346
    Just create anonymous node like this:
    create_anonymousfunction.gif

    No, currently there's no node like that.
     
  39. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    278
    I mean, when I create an anonymous function, I put the function I want to use in its body, and then I need to connect it to a return node. But when I place a return node, it has the same return type as the main function I'm editing, not as the anonymous function. So what I need is a return node that has the same return type as the anonymous function.
     
  40. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    346
    Sorry for misunderstanding, just check the 'Return Any Type' in the inspector.
    Screenshot (290).png
     
    Mark_01 and Szaruga like this.
  41. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    278
    Thanks, it works, but it's an extra function call compared to using the function directly, which can have an impact on performance when it's called many times during the sorting process. So it would be nice if you add the possibility to use functions as delegates in a future version (also it would make the code look more clean).
     
    Mark_01 likes this.
  42. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    346
    Sure;).
     
    Mark_01 and Szaruga like this.
  43. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    278
    @wahid_rachmawan
    I found error --->
    I can't enter "this" as a parameter inside a fuction call node, and when I use a separate "this" node, I get an error. The generated code is correct though.
    2019-03-12_17-28-52.png
    2019-03-12_17-17-51.png
    2019-03-12_16-54-39.png
     
  44. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    346
    I'll investigate and fix it soon thanks for report.

    Hmm that's weird error, try to disable pre compilation to save the file instead.
    Its error is from pre compilation, we can't fix it for now.
     
  45. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    278
    @wahid_rachmawan
    I'm a little worried about the different contents of the selection window, depending on the way it's invoked, for example:

    When I right-click on a variable, and select "Get instance", I get a list of all the members and extensions.

    When I right-click on an empty space, select "Add Node", and then right-click on the variable in the list, I get a list of members, but no extensions.

    Because it's not the first time I saw a situation like this.
     
  46. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    346
    Its because the extension is still not implemented on variable list etc, The main reason because the extension is node.
     
  47. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    278
    @wahid_rachmawan

    When I create a new node, find the class, and select "new" --->
    2019-03-16_21-50-22.png
    the constructor in C# code is generated properly with the initializer.
    ------------------------------------
    When I right-click on an input point of a node, and select "Assign to constructor node" --->
    2019-03-16_21-43-29.png
    the constructor in C# code is generated without the initializer.
     
  48. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    346
    I think something wrong, i'll investigate and fix it ASAP.

    Thanks for report it.
     
    Szaruga likes this.
  49. Szaruga

    Szaruga

    Joined:
    Jan 29, 2016
    Posts:
    278
  50. wahid_rachmawan

    wahid_rachmawan

    Joined:
    Oct 4, 2017
    Posts:
    346
    No problem