Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Good places to start for beginners...

Discussion in 'UI Toolkit' started by funcookergames, Nov 21, 2019.

  1. funcookergames

    funcookergames

    Joined:
    Dec 10, 2018
    Posts:
    9
    Hello and thank you very much for any help!

    Very much struggling to get started with the UIElements/UI Builder.

    More specifically, very unsure of how to call a toggle or really any element found in the component.This is the UI element I have built out.

    I have watched and read through as many videos and pages as possible, but have been unable to find a resource or post on how to "public override VisualElement CreateInspectorGUI()" for a struct or class.



    Just trying to set these variables to the class and are unsure of how to go about this.
     
  2. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,231
  3. funcookergames

    funcookergames

    Joined:
    Dec 10, 2018
    Posts:
    9
    Yes, I have been to and reviewed these pages and video several times over.

    Because there are very few examples out there, I have been unable to glean how to call or set a bool. The attributes/syntax(?) over on this page is wildly confusing and I can't follow it.

    https://docs.unity3d.com/Manual/UIE-ElementRef.html

    Are there any other guides or information out there? I have tried to find help in several different places only to be pointed to the links you have posted above.

    Unfortunately we are completely stuck and haven't moved in days because we can't wrap our head around the limited documentation that is out there.
     
  4. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,231
    It would help to ask more specific questions. For example, are you trying to find out how to:
    1. change an attribute on a VisualElement in C#?
    2. set an attribute on a VisualElement in UXML?
    3. bind the value of an attribute on a VisualElement to the value of a field on a Unity Object, GameObject, or ScriptableObject?
    4. use what you made in the UI Builder inside a custom Inspector for a MonoBehaviour?

    Here's also a more basic intro video to UIElements: