'asset' is unversioned and we cannot safely load unversioned files in the editor

Help needed! I am into .pak files to use in my game doing some initial tests and I am not being able to make it work in the editor.

I just cook the assets in the editor using this:

image

then I go to \saved\cooked\windows<project_name> and there is the Content folder.

I create a temp folder for packing called F:\provi and inside I create the folder and copy the cookec Content folder there.

Using unrealpak.exe from the engine I make my test.pak file

the structure is this:

F:\Provi>unrealpak "F:\provi\test.pak" -list
LogPakFile: Display: Using command line for crypto configuration
LogPakFile: Display: Mount point PakTest/Content/
LogPakFile: Display: "Meshes/pelotamenu.uasset" offset: 0, size: 1417 bytes, sha1: AB4FB92393CBEFB128620128AC713244BE225099, compression: None.
LogPakFile: Display: "Meshes/pelotamenu.ubulk" offset: 1470, size: 1032 bytes, sha1: C18D33664D798118BBF132E5BAD8583FA99B478A, compression: None.
LogPakFile: Display: "Meshes/pelotamenu.uexp" offset: 2555, size: 85387 bytes, sha1: 6815045431FEF54780CCA3CA1585822FEB17934F, compression: Zlib.
LogPakFile: Display: "Sound/kiss.uasset" offset: 88063, size: 715 bytes, sha1: 7D2227B6B68398A416D32F2044EB98CF4EE5D43F, compression: None.
LogPakFile: Display: "Sound/kiss.ubulk" offset: 88831, size: 21720 bytes, sha1: 1B2A110B797F6931CA0E90ED2AA5F3CE89334A82, compression: None.
LogPakFile: Display: "Sound/kiss.uexp" offset: 110604, size: 152 bytes, sha1: B056D80B702443E7607DCD9E7573F2FBC25A8C46, compression: None.
LogPakFile: Display: 6 files (110423 bytes), (0 filtered bytes).
LogPakFile: Display: UnrealPak executed in 0.001123 seconds

F:\Provi>

so I just copy my test.pak file into the project inside /saved/paks/

then I mount the pak running this:

bool UGameInstance_CPP::MountPak(const FString& PakName)
{
    FString PakFilePath = FPaths::Combine(FPaths::ProjectSavedDir(), TEXT("Paks"), PakName + TEXT(".pak"));
    FPaths::NormalizeFilename(PakFilePath);
    
    if (!FPlatformFileManager::Get().GetPlatformFile().FileExists(*PakFilePath))
    {
        return false;
    }
    IPlatformFile& PlatformFile = FPlatformFileManager::Get().GetPlatformFile();
    FPakPlatformFile* PakPlatformFile = new FPakPlatformFile();
    PakPlatformFile->Initialize(&PlatformFile, TEXT(""));
    FPlatformFileManager::Get().SetPlatformFile(*PakPlatformFile);
    if (PakPlatformFile->Mount(*PakFilePath, 0, TEXT("/PakTest/Content/")))
    {
        return true;
    }
    else
    {
        return false;
    }
}

it looks it mounts the pak sucesfully

then I try to get a test asset with this:

bool UGameInstance_CPP::GetAssetFromPak(const FString& AssetPath, UObject*& OutObject)
{
    FString FullAssetPath = FString::Printf(TEXT("/Game/%s"), *AssetPath);
    OutObject = StaticLoadObject(UObject::StaticClass(), nullptr, *FullAssetPath);
    return OutObject;
}

the node:

I just get this:

LogLinker: Warning: Failed to read package file summary, the file "/Game/Sound/kiss" is unversioned and we cannot safely load unversioned files in the editor.
LogLinker: Warning: Failed to read package file summary, the file "/Game/Sound/kiss" is unversioned and we cannot safely load unversioned files in the editor.
LogUObjectGlobals: Warning: Failed to find object 'Object None./Game/Sound/kiss'

any clue?

Hi @eldany.uy
Have you resolved this issue?
I’m also experiencing this issue. The core code is the same as yours. It mounts fine, but when loading resources, it generates the same exception. However, when I package it as a Windows application, it runs fine.