Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Unity UI / Visual Scripting

Discussion in 'UI Toolkit' started by NodeLondon, Nov 30, 2021.

  1. NodeLondon

    NodeLondon

    Joined:
    Jun 24, 2021
    Posts:
    10
    Hi there,

    I'm attempting to reference a text label inside my UIDocument via the new Unity Visual Scripting.

    I believe I need to replicate the below code to query the rootVisualElement but I can't seem to find the correct 'node' or sequence of 'nodes' in the Visual Scripting panel.

    var myLabel = rootVisualElement.Q<Label>("myLabel");

    I simply want to set its value at run-time.

    Any advice would be much appreciated. Maybe I'm missing some node or type assembly?

    Unity Version
    2021.2.4f1
    Unity UI
    Version 1.0.0 - November 18, 2021
     

    Attached Files:

    Last edited: Nov 30, 2021
  2. JuliaP_Unity

    JuliaP_Unity

    Unity Technologies

    Joined:
    Mar 26, 2020
    Posts:
    666
    Hello! UI Toolkit is not yet integrated with Visual Scripting, it works only with UGUI, Unity's previous and still main UI system. Sorry to disappoint you! :oops:
     
  3. NodeLondon

    NodeLondon

    Joined:
    Jun 24, 2021
    Posts:
    10
    Thank you Julia, is there a roadmap for Visual Scripting & UI Toolkit ?

    Rich
     
  4. JuliaP_Unity

    JuliaP_Unity

    Unity Technologies

    Joined:
    Mar 26, 2020
    Posts:
    666
    It's not on our current roadmap, no, although we do have it on our radar of course. You can check both the Visual Scripting and the UI roadmaps in this link: https://unity.com/roadmap/unity-platform/gameplay-ui-design

    There you can see what's in progress and what's coming, and you can also submit your own requests of what you think Unity should work on :cool:
     
    N04H08 likes this.