Search Unity

Feature Request Ui builder after play mode

Discussion in 'UI Toolkit' started by fomafomitch, Oct 13, 2021.

  1. fomafomitch

    fomafomitch

    Joined:
    Nov 22, 2020
    Posts:
    89
    Hello,

    I generate some VisualElement/Label with a script when I enter play mode.

    But when I look at "UI BUILDER" I can't see what my script did (only in game screen of course).

    Is there a way to "inspect" my UI after play mode ?
     
  2. JuliaP_Unity

    JuliaP_Unity

    Unity Technologies

    Joined:
    Mar 26, 2020
    Posts:
    700
    The UI Builder is only meant to show contents of a UXML, and since you're programmatically creating your VisualElement/Label, it won't be able to see it there indeed.

    Have you tried the UI Toolkit Debugger? You can access it through Window > UI Toolkit > Debugger or in any Editor Window's menu. You'll have a view of the hierarchy of your UI and be able to check on property values for each element individually, even change some values - just be aware none of those edits will be saved anywhere. You'll need to select the name of your PanelSettings under the dropdown menu.
     
    tonytopper likes this.
  3. fomafomitch

    fomafomitch

    Joined:
    Nov 22, 2020
    Posts:
    89
    Thanks ! It's exactly what I was looking for.
     
    JuliaP_Unity likes this.