Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Mounted pack map has wrong references

Hello, I'm trying to make a generic menu that can load a dynamic set of indipendent(downloadable) maps and I've been looking into the pak system.

I made a project with only a map and some assets inside it(some custom and some unreals), and built it as a pak.
In another project that acts as a menu I've written some code to load and mount a pak.

The pack mounts correctly and it lets me open the map, but when loaded it doesent display any objects!
Looking into the Log file showed me that the reference paths for the map didnt get updated with the new mount directory but they still reference the /Game/ folder.

Here's the code I'm using to mount the pak.

 FString AbsolutePathToPak = TEXT("D:/PakTest/IndipendentMap.pak");
     FString StandardFilename = FPaths::ProjectPluginsDir() + TEXT("DLC1/");
     StandardFilename = FPaths::GetPath(StandardFilename);
     if (!pakPlatformFile->Mount(*AbsolutePathToPak, 0, *StandardFilename))
         return false;
     FPackageName::RegisterMountPoint(_T("/DLC1/"), StandardFilename);
     FAssetRegistryModule& AssetRegistryModule = FModuleManager::LoadModuleChecked<FAssetRegistryModule>(FName("AssetRegistry"));
     IAssetRegistry& assetRegistry = AssetRegistryModule.Get();
     FJsonSerializableArray pathnames;
     assetRegistry.ScanPathsSynchronous(pathnames, true);
     return true;

The pak gets correctly mounted and the map gets placed here:

 LogTemp: Map path:/DLC1/CustomMap/Content/MyMap.MyMap
 LogTemp: Map Package:/DLC1/CustomMap/Content/MyMap
 LogTemp Map Name: MyMap

And here's the log file output after I use the comand "open MyMap"

 LogNet: Browse: /DLC1/CustomMap/Content/MyMap
 LogLoad: LoadMap: /DLC1/CustomMap/Content/MyMap
 LogStreaming: Display: Flushing async loaders.
 LogStreaming: Error: Couldn't find file for package /Game/customassetone requested by async loading code. NameToLoad: /Game/customassetone
 LogStreaming: Error: Found 1 dependent packages...
 LogStreaming: Error:   /DLC1/CustomMap/Content/MyMap
 LogStreaming: Error: Couldn't find file for package /Game/customassettwo requested by async loading code. NameToLoad: /Game/customassettwo 

Basically the map tries to open customassetone and customassettwo from the /Game/ directory, when instead its in /DLC1/CustomMap/Content/ , the same directory as the map.

Does anyone know how can I update these references?
Thanks in advance for your time!

Product Version: UE 4.21
more ▼

asked Feb 15 '19 at 02:44 PM in Packaging & Deployment

avatar image

Hotminds Srl
1 1

avatar image Hotminds Srl Feb 20 '19 at 08:16 AM

Bumping, made no real progress. Only solution seems to change the DLC name to be the same as the menu and then mount the DLC in the root directory so it can keep the references. This is really bad though because you cant have files with the same name and it seems that you cant add things to the Engine folder without Unreal refusing to mount the pak

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question