Announcement

Collapse
No announcement yet.

Web Widget - Loading a local HTML file

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Web Widget - Loading a local HTML file

    Posted on the answer hub, but hoping for a quick response here:
    I am having an issue with bringing up a web site that is local on my hard drive using the Web Widget. I mean, it works fine when I use the full path, including the drive letter. My question is how do I pull up an HTML file with a relative path? Example: The MEDIA PLAYER uses ./Movies/videoname.wmv So, when my project is packaged, the movie will play regardless of where it's run from. I need this same thing to work with a localized web page. My html is in my Content/WebPages folder, and ./Content/WebPages does not work (or ./WebPages). Makes sense? thanks for your help!
    Tracey White - Senior Design Visualization Artist / PC Game Enthusiast / Drummer
    My Maze Game development video series
    My Maze Game Blog

    #2
    I'm using blui as a web browser to make textures - I think in that case you use blui:// rather than file:// to get a root position in the content directory. In my case though I use Rama's victory plugin which has several notes to get the paths I need.

    Comment


      #3
      Thanks for the reply. I wish it could help with my situation and the way my project is. I do appreciate the response.
      If anyone else has any idea, please let me know.
      Tracey White - Senior Design Visualization Artist / PC Game Enthusiast / Drummer
      My Maze Game development video series
      My Maze Game Blog

      Comment


        #4
        I found this looking for an answer on this same issue a while back. I suspect the answer is similar to what Dannington offered but without the Blui element.
        There are a number of available plugins that can extract a file path to your content directory, or you can code your own if you don't mind diving into C++
        I personally use the Low Entry system. In this case the Low Entry File Manager. It's $39.99 on the Unreal Marketplace at the moment but it's gone on sale at least once I think. Regardless I've found it worth every penny because of situations like this. I've had to experiment a few times to locate where the packaged locations of things wind up but it's pretty easy to do as its all Blueprint nodes. Locate the file, get the absolute path, stick on the "file://" prefix, and feed it to the widget as your source. Make sure you use in your HTML relative locations to support files (JS, CSS, etc.). Now for the record I think there is a function in the Unreal API that gives the paths to a number of special folders in a packaged game. It means you will have to dive into C++ coding though.

        Comment

        Working...
        X