How to load a map from a dynamic level

I tried being in different folders when using UnrealPak.exe but it didn’t have any effect on the pakfile contents and their paths :frowning:

Do you remember how you would make pakfiles when you had this working?

I reckon it will be because its in “/Game/PakSource/Content/” - it should be in “/Game/Content/” but I’m not sure on how to tell UnrealPak to go one level up - perhaps by being in that folder when packing?

Yeah I had some similar thoughts when working on these routines - I reckon that it will work really well! Happy to hear you’re working on it! :slight_smile:

haha my memory is pretty bad sorry, fortunately I’d made a batch file which contains:

unrealpak d:\Footprints.pak d:\Footprints.umap d:\Engage*.* d:\FootprintMeshes*.*

If that’s any help… It looks like I put everything in the root of D: to solve it…

looks like the paste lost some of the formatting:
unrealpak d:\Footprints.pak d:\Footprints.umap d:\Engage*.* d:\FootprintMeshes*.*

http://r4nc1d.com/files/MakeFootprintsPak.txt

The only clue I’ve found so far is that I’ve named some archives of the dynamic maps as “-WindowsNoEditor” which makes me think I’m using cooked assets built for shipping - I’ve got some vague recollection that shipping is important…

I tried building my pak using the same method and its giving me this:

LogTemp: Warning:  D:\PAKS\test3.pak loaded and mounted, listing...
LogTemp: Warning: File: /Game/maptest.umap
LogTemp: Warning: File: /Game/test.uasset
LogPackageName: SearchForPackageOnDisk took   0.167s, but failed to resolve maptest.umap.
LogPackageName: SearchForPackageOnDisk took   0.166s, but failed to resolve maptest.umap.

Do you know if those are cooked assets or just raw from the content folder of the project?

Yeah I tried with cooked and uncooked assets and got the same thing. gahhhhhhhh this is killing me lol

Did you ever get it to a spot where you could load the map but not the other assets? I have some old code I tried which can load the map but that’s the only thing that loads, any materials or custom meshes don’t get loaded.

Yeah, they are both in D:\UE4\4.17\PakSource\Content

In order to get the map to load, I have to mount the pakfile to FPaths::EngineContentDir() instead of to Game. At which point I get this error after the map loads: LoadErrors: Error: /Engine/maptest : Can't find file for asset. /Game/test. test is the name of my material i applied to some blocks

Yeah I think I did have that problem at one point too. When you created the map and asset did you put both in the root of /Game/? Any assets referenced by the map still need to follow their relative path…

I think I played with the engine content folder for a while but had success using the game folder - it’s possible that the /Game/ folder is not being included in a search order - you may need to add it somewhere, but I’m afraid I can’t remember where…

The AssetRegistry is Editor only so I wouldn’t think so. What does the “Pack List” look like now when it logs the contents of the pack?

When I list one of my pak files I get a somewhat more “packaged” set of files - are you sure that you’ve Packaged the files for WindowsNoEditor? Here’s a subset of my list:

LogPaths: Warning: No paths for game localization data were specifed in the game configuration.
LogInit: Warning: No paths for engine localization data were specifed in the engine configuration.
LogPakFile: Display: Mount point …/…/…/
LogPakFile: Display: “Engine/Content/Functions/Engine_MaterialFunctions01/Opacity/CameraDepthFade.uasset” offset: 0, size: 8757 bytes, sha1: 1D73CD0EDE4A4C73D19E40AB82DAC45A52FDD696.
LogPakFile: Display: “Engine/Content/EngineMaterials/T_Default_Material_Grid_M.uasset” offset: 8810, size: 350605 bytes, sha1: A1B7EBD88C1B91591B048F3F004CB66E2190FF33.

LogPakFile: Display: “Engine/Content/Maps/Entry.umap” offset: 3056467, size: 11331 bytes, sha1: B5EB6D806419BBC8D8D601481331D71AA1880E31.

LogPakFile: Display: “EngageFootprints/Content/Engage/Slides.uasset” offset: 3067851, size: 1878 bytes, sha1: 747D3CC1FDAC4F1D60BA861F4F8B45B5CC6E392B.
LogPakFile: Display: “EngageFootprints/Content/Engage/UMG/gfx/ppDrawN.uasset” offset: 3070659, size: 4341 bytes, sha1: 88AAE82599616E67833332ED03B4DF596810AB34.
LogPakFile: Display: “EngageFootprints/Content/Engage/UMG/gfx/ppHomeN.uasset” offset: 3075053, size: 4341 bytes, sha1: 335B608360961BA1DAFB8218F574ECB33407C499.

LogPakFile: Display: “Engine/Content/Slate/Testing/TestRotation.png” offset: 43820412, size: 854 bytes, sha1: 08A997B7E86C69129C91D02F76456E092513F752.
LogPakFile: Display: “Engine/Plugins/Blendables/LightPropagationVolume/LightPropagationVolume.uplugin” offset: 48334833, size: 821 bytes, sha1: D7763AC136FC172EA34AD7C9A186954F00714669.
LogPakFile: Display: “Engine/Plugins/Developer/UObjectPlugin/UObjectPlugin.uplugin” offset: 48335707, size: 499 bytes, sha1: F7280079FAEBD04A28410E6C8D1CFA091B4E01E7.
LogPakFile: Display:

Interesting! Yeah I have a umap in there and no uexp or ubulk files…

LogPakFile: Display: “EngageFootprints/Content/Footprints.umap” offset: 8615285, size: 129508 bytes, sha1: 3FE00EAB5C1C020CE0AE3E9477247C7EEF1AE27C.

■■■■, I have no idea where to do that either…

IT could have something to do with the AssetRegistry file?

Which pack list do you mean? In the game when I log it using PakPlatform->IterateDirectoryRecursively() it prints this:

LogTemp: Warning: File: /Game/maptest.umap
LogTemp: Warning: File: /Game/test.uasset

And when I list out the pakfile in the command line using UnrealPak.exe D:\PAKS\test.pak -List it prints this:

LogPakFile: Display: Mount point D:/UE4/4.17/PakSource/Content/
LogPakFile: Display: "maptest.umap" offset: 0, size: 749458 bytes, sha1: 2F0B6BDD8AFCBFD10B3BEA083D5058B1718229E9.
LogPakFile: Display: "test.uasset" offset: 749511, size: 99694 bytes, sha1: 3CF6D36A4E575D523AC70A42FB15191389E84011.
LogPakFile: Display: 2 files (849152 bytes), (849152 filtered bytes).
LogPakFile: Display: Unreal pak executed in 0.001153 seconds

edit: these text boxes are getting very narrow. I’m going to copy this reply farther up the chain and we can continue there.

WORMHOLE

WORMHOLE FROM DEEP THREAD

Which pack list do you mean? In the game when I log it using PakPlatform->IterateDirectoryRecursively() it prints this:

LogTemp: Warning: File: /Game/maptest.umap
LogTemp: Warning: File: /Game/test.uasset

And when I list out the pakfile in the command line using UnrealPak.exe D:\PAKS\test.pak -List it prints this:

LogPakFile: Display: Mount point D:/UE4/4.17/PakSource/Content/
LogPakFile: Display: "maptest.umap" offset: 0, size: 749458 bytes, sha1: 2F0B6BDD8AFCBFD10B3BEA083D5058B1718229E9.
LogPakFile: Display: "test.uasset" offset: 749511, size: 99694 bytes, sha1: 3CF6D36A4E575D523AC70A42FB15191389E84011.
LogPakFile: Display: 2 files (849152 bytes), (849152 filtered bytes).
LogPakFile: Display: Unreal pak executed in 0.001153 seconds