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

UIElementsSchema

Discussion in 'UI Toolkit' started by Scorr, Aug 18, 2020.

  1. Scorr

    Scorr

    Joined:
    Jul 2, 2013
    Posts:
    73
    This folder gets generated automatically. Is this something we should commit to version control? Or gitignore?
     
  2. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,231
    This is to help some IDEs auto-complete for you when you write UXML files. Both Rider and Visual Studio should support this. But it's 100% optional. The reason it's "auto" generated is because it contains not just our built-in types but also your custom element types. If you find the auto-complete feature useful, keep in version control, otherwise, it's safe to gitignore.
     
  3. Kleptine

    Kleptine

    Joined:
    Dec 23, 2013
    Posts:
    274
    Glad to have these! Suggestion: It would be nice to find a way to embed these in the packages themselves, or generate them into the Library folder, rather cluttering the Project folder.

    Additionally, if we ignore them in Git, is it guaranteed they'll be generated for anyone else pulling the branch? Ie. is it safe to ignore them, if we'd like to keep auto-complete behavior?
     
  4. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,231
    It's up to you. Schema generation is not highly enforced and it's a bit lazy. I don't know exactly what the triggers are but I know it's not something like .meta generation. You can ignore it and just make it an option for those that want the auto-completion. If someone uses the UI Builder more, or a text editor that doesn't support schemas, they may not need the auto-completion.
     
  5. Obscure045

    Obscure045

    Joined:
    Aug 2, 2022
    Posts:
    14
    Does Visual Studio Code support this?