Load file from root path

Assets load path seems need relative path. I feel hard to manage files that moved directory.

example:

<!-- MainView.ux -->
<App>
  <Font File="assets/fonts/fontawesome-webfont.ttf" ux:Global="FontAwesome" />
  <JavaScript File="node_modules/codebird/codebird.js" ux:Global="codebird"/>
</App>

<!-- Controls/PopupWindow.ux -->
<App>
  <Font File="../assets/fonts/fontawesome-webfont.ttf" ux:Global="FontAwesome" />
  <JavaScript File="../node_modules/codebird/codebird.js" ux:Global="codebird"/>
</App>

Thanks for the input! We’ll look into it.

Any updates regarding this topic ? Thanks.

This is not how you include JavaScript anymore, you use bundle in your project file.

Hi,

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.