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 are updating our Terms of Service for all Unity subscription plans, effective October 13, 2022, to create a more streamlined, user-friendly set of terms. Please review them here: unity.com/legal/terms-of-service.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice
  4. Join us on Thursday, September 29, for a day with Unity's SRP teams here on the forum or on Reddit, and discuss topics around URP, HDRP, and the Scriptable Render Pipeline in general.
    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:
    210
    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:
    637
  3. Suduckgames

    Suduckgames

    Joined:
    Nov 28, 2016
    Posts:
    210
    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:
    637
    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:
    210
    Yes, it makes more sense. Sorry for the misunderstanding. Thank you very much for your input!
     
unityunity