Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. 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. JohnPontoco

    JohnPontoco

    Joined:
    Dec 23, 2013
    Posts:
    298
    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:
    18
    Does Visual Studio Code support this?