Assets load path seems need relative path. I feel hard to manage files that moved directory.
<!-- MainView.ux -->
<Font File="assets/fonts/fontawesome-webfont.ttf" ux:Global="FontAwesome" />
<!-- Controls/PopupWindow.ux -->
<Font File="../assets/fonts/fontawesome-webfont.ttf" ux:Global="FontAwesome" />
Thanks for the input! We’ll look into it.
Any updates regarding this topic ? Thanks.
Is there a way to specify file locations based on the root of the project?
Hope this wasn’t a stupid question!
Paths in the
.unoproj is relative to that file. Does that answer your question? Please describe what you are trying to do
I was looking for the answer to the original question. I’m refactoring my project and wanted to separate assets from UX. I had to specify relative paths. That’s is not terribly convenient because you have to search/replace the paths anytime you move files up or down the folder structure.
So, this worked:
<Video Layer="Background" File="../../assets/nature.mp4" >
But these did not:
<Video Layer="Background" File="/assets/nature.mp4" >
<Video Layer="Background" File="~/assets/nature.mp4" >
<Video Layer="Background" File="file:///assets/nature.mp4" >
Since you’re saying you’re looking for an answer, here’s the current status: You need to refer to a file by the relative path from the unoproj-file it was included in. No other paths will work.
We’ve noted the feature-request, but we have not yet made any plans for such a feature.