I have a .uxml file that contains other .uxml files as children.
There have been multiple instances where the editor throws an exception out of the blue saying it can’t find the .uxml files. I am then forced to re-add them and re-apply any styles.
Do you have more information on the error?
My guess would be that maybe your project structure changed and assets are not recognized anymore.
Were your assets using complete paths with ids, or just paths?
What I mean by that is, did your templates look something like this? (see src=“…”)
<ui:Template name="ButtonTemplate" src="project://database/Assets/Resources/ButtonTemplate.uxml?fileID=9197481963319205126&guid=19b41fd426d854103932ea16dbf78d23&type=3#ButtonTemplate" />
<ui:Instance template="ButtonTemplate" name="ButtonTemplate" />
If they didn’t look like this, and were simple paths, it is possible that if your assets moved in the project, their link was broken.
This way of storing templates was recently added, so it also depends on which version you are using.
It appears that I’m just using paths as opposed to complete paths with ids.
<ui:Template name="Equipment" src="Equipment/Equipment.uxml" />
I’m using Unity version 2021.1.21f, and the package version preview.17.
Ok, that means if your project structure changed, you’re most likely going to have these missing file errors.
With package preview.17, you should have access to the new mechanism, so you can probably simply open your uxml files in the builder and save them to start using the new, location-independent, source format.