Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

Questions about Template.path and schemeLocation in UXML

Discussion in 'UI Elements' started by Kichang-Kim, May 14, 2019.

  1. Kichang-Kim


    Oct 19, 2010
    Hi, The title is all, is there any method for using relative path for Template.path?

    The official sample ( used full path like this:
    But generally, reusable templates need to be packaged and easily changed its path. Also Custom Packages are located in Packages folder, not Assets.

    So, questions are:
    1. Can I use relative path?
    2. Can I use templates in Packages folder?

    3. Is it impossible to set project root relative path for schemaLocations? It seems that current auto-generated uxml has self-relative path for scheme path, so if the uxml file is moved to other folder, it doesnt work.
    Last edited: May 14, 2019
  2. patrickf


    Unity Technologies

    Oct 24, 2016
    Hi, currently, all your templates need to be placed under the Assets folder. You can not specify relative paths.

    As for schema location path, they need to be updated when the UXML file move. However, they are there for use by text editors only. Unity does not used the schema files to validate the UXML.