What determines whether files in the assets folder are preloaded? I have this line in my project.xml file:
<assets path="Assets" rename="assets" exclude="*.swf" />
Is preload=“false” the default value or do I have to add it?
I tried adding it and couldn’t see any difference in how long the progress bar was present.
How do I test in my code if a file in the assets folder was preloaded?
Can I specify which files are preloaded by extension? If so how?
Should font files always be preloaded?
Thanks in advance.
embed=true
should be an answer.
There is an embed attribute for <assets>
and I believe it defaults to true. I prefer to make it explicitly either true or false for every asset tag I use.
The documentation is at: XML Format
It doesn’t cover everything it should, but it should be a good start.
If you compile to html5 you can see the assets load in the web developer console in your browser (network activity).
Thanks. Using these lines seem to work:
<assets path="Assets" rename="assets" exclude="*.swf | *.jpg | *.png" />
<assets path="Assets/images" rename="assets/images" include="*.jpg | *.png" embed="false" />
So what does the preload setting actually do?
As far as I know, the preload attribute is only for the library tag, not the assets tag.
How do I make the following statement include all sub folders in the Assets folder?
<assets path="Assets/images" rename="assets/images" include="*.jpg | *.png" embed="false" />
I’m getting mixed results especially with subfolders inside the Assets folder. So I need someone to tell explicitly what this line should be to prevent any png or jpg file in any subfolder of Assets from being preloaded:
<assets path="Assets" rename="assets" include="*.jpg | *.png" embed="false" />
Thanks in advance!
I apologize for missing this message, please forgive me.