How do I use uploaded files while previewing in Construct 3?

From the Asset Store
Simple yet very life-like rag doll made with Physics!
  • 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?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)