Search Unity

UIElementsSchema

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

  1. Scorr

    Scorr

    Joined:
    Jul 2, 2013
    Posts:
    72
    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,065
    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.
     
    Kirsche and Scorr like this.
  3. Kleptine

    Kleptine

    Joined:
    Dec 23, 2013
    Posts:
    167
    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,065
    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.
     
unityunity