Hello,
I’ve been trying to get HTML5 UE4 set up so files can be in different directories on the web server and still load. I was able to get the .data file to load by adding “filePackagePrefixURL: ‘http://localhost:3000/games/’” to the emscripten Module initializer. However, trying to get the UE4Game.js.mem file to load from another directory by adding:
locateFile: (function(name){return"http://localhost:3000/javascripts/engines/4.8/UE4Game-HTML5-Shipping.js.mem"})
results in the error:
LowLevelFatalError [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.8\Engine\Source\Runtime\PakFile\Private\IPlatformFilePak.cpp] [Line: 324]
Corrupted index offset in pak file.
It looks like the locateFile entry does work because the console says “http://localhost:3000/javascripts/engines/4.8/UE4Game-HTML5-Shipping.js.mem downloaded”, but it still doesn’t run due to the error.
I know one workaround could be to have it build the .mem into the javascript, but that will hurt load times and possibly run into compatibility issues in javascript engines that can’t support large arrays. Is there any way to solve this problem so locateFile doesn’t cause this pak file error?
Thanks,
Chris