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

Question Unity UI Toolkit lacking of some Yoga properties for a POC?

Discussion in 'UI Toolkit' started by Suduckgames, Aug 5, 2022.

  1. Suduckgames

    Suduckgames

    Joined:
    Nov 28, 2016
    Posts:
    218
    Hi there! I am trying to do a proof of concept where Unity UI toolkit may be a good fit for our use cases.

    We are trying to use UI toolkit to implement user-generated UI.

    The user generates a code in react and later, we will convert it to something that Unity can understand (programmatically) on the fly. We use protobuff for communication between the two apps and Yoga as a UI standard.

    Everything is working fine but I have noticed that there are some properties that are missing in the UI toolkit.

    For example, for the align options from the yoga documentation you can see that in the combo, they have more properties that are missing like space around and space between.

    Can someone confirm that these options are not included? If so, are any future plans to implement them?
    Also, I have noticed that the default values in Unity are null. It is safe to assume that unity null value are the defaults specify for Yoga?

    Thanks in advance!
     
  2. antoine-unity

    antoine-unity

    Unity Technologies

    Joined:
    Sep 10, 2015
    Posts:
    771
  3. Suduckgames

    Suduckgames

    Joined:
    Nov 28, 2016
    Posts:
    218
    Thank you for the answer, sorry I think that I didn't explain myself correctly.

    I mean attributes for align-items and align-self.

    There is a screenshot of the yoga documentation. as you can see, in the bottom left there is "baseline", "space between" and "space around" properties that aren't available for the current version (AFAIK). (They didn't added the documentation, but those attributes are still available)

    Do you know if you are going to implement them in the future?

    upload_2022-8-5_17-42-14.png
     
  4. antoine-unity

    antoine-unity

    Unity Technologies

    Joined:
    Sep 10, 2015
    Posts:
    771
    Oh I see I know. The terminology we use would be the "possible values for" the "align-items" and "align-self" attributes/properties.

    Yes, baseline, space-around and space-between are missing from Align enumeration. The last two don't make sense for align-self, align-items but they do for align-content.

    Unfortunately I can't provide an ETA for when they might become supported.
     
  5. Suduckgames

    Suduckgames

    Joined:
    Nov 28, 2016
    Posts:
    218
    Yes, it makes more sense. Sorry for the misunderstanding. Thank you very much for your input!