I have uploaded png
and css
files in the Files section of the Project bar but I can't seem to locate where these files appear while previewing the project.
When the game is exported, the files are saved in the root directory and can be accessed using "filename.png"
(for example, background-image: url("filename.png")
in a css
file.
However, in the web browser while previewing the game, "filename.png" does not work, nor does "files/filename.png" or "Files/filename.png".
For loading CSS files from the files, I am running the script:
link = document.createElement("link");
link.type = "text/css";
link.rel = "stylesheet";
link.href = "style.css";
document.head.appendChild(link);
This as well only works when exported since style.css
can not be located in the preview.
How can I access imported files when previewing the project in Construct 3?