How do I make my media use their relative path instead of local in a packaged game?
I am packaging up a project and testing it on a separate laptop. When packaged and playing on my computer the video files play fine in the main menu and in play content, however when packaged and played on the other computer the video files fail to load and display black. The Media is in Content\movies\ and I am using a blueprint which references the full local directory (which is what I would assume is causing the issue), If i change that path to anything other than the full directory the video files don't play at all.
Any idea of how I can get this to work?
asked Feb 03 '17 at 03:51 PM in Packaging & Deployment
You can use either. OpenSource probably makes more sense and is more convenient. If you use OpenFile with relative paths, you have to follow the Engine's conventions for relative file paths. This means that the file path will be relative to the directory from which the executable is launched, something like:
The media source asset uses a special syntax for relative paths, which starts with "./". It translates into "my game's Content directory". Unfortunately, this syntax is not supported anywhere else. I contemplated adding support to OpenFile and OpenUrl, but I may actually deprecate it altogether as it probably wasn't a good idea in the first place.
answered Feb 16 '17 at 06:43 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here