Load asset async from dlc pak file

I use Projectlauncher make a release version and make a dlc pak file based on this release version. in the game i mount dlc pak file and use RequestAsyncLoad method of FStreamableManager to load asset in dlc,but log file output ‘the file contains unrecognizable data, check that it is of the expected type’.

I tried both WindowsNoEditor on win7 and Android_ASTC on my android phone by setting up Projectlauncher cooked platforms config and both failed for the same reason. My unreal editor version is 4.11.2. Operating system is Windows 7 64bit.

dlc pak file for WindowsNoEditor (file extension name is modified for uploading) :
[link text][1]

when code execute this line ‘StreamableManager->RequestAsyncLoad(StreamedAssets, FStreamableDelegate::CreateRaw(this, &FAssetStreamer::OnStreamingCompleteDelegate));’
the output of log file is as follows:

[2016.05.04-10.11.55:200][ 76]LogLinker:Warning: The file ‘…/…/…/LoadTest/Content/Content/ArchVis/Textures/T_Wood_S.uasset’ contains unrecognizable data, check that it is of the expected type.

[2016.05.04-10.11.55:200][ 76]LogLinker:Warning: The file ‘…/…/…/LoadTest/Content/Content/ArchVis/Textures/T_Wood.uasset’ contains unrecognizable data, check that it is of the expected type.

[2016.05.04-10.11.55:200][ 76]LogLinker:Warning: The file ‘…/…/…/LoadTest/Content/Content/ArchVis/Textures/T_Table_N.uasset’ contains unrecognizable data, check that it is of the expected type.

[2016.05.04-10.11.55:200][ 76]LogLinker:Warning: The file ‘…/…/…/LoadTest/Content/Content/ArchVis/Textures/T_Table_M.uasset’ contains unrecognizable data, check that it is of the expected type.

[2016.05.04-10.11.55:200][ 76]LogLinker:Warning: The file ‘…/…/…/LoadTest/Content/Content/ArchVis/Textures/T_Table_AOMASK.uasset’ contains unrecognizable data, check that it is of the expected type.

[2016.05.04-10.11.55:200][ 76]LogLinker:Warning: The file ‘…/…/…/LoadTest/Content/Content/ArchVis/Mesh/SM_CoffeeTable.uasset’ contains unrecognizable data, check that it is of the expected type.

[2016.05.04-10.11.55:200][ 76]LogLinker:Warning: The file ‘…/…/…/LoadTest/Content/Content/ArchVis/Materials/M_CoffeTable_MAT_Inst.uasset’ contains unrecognizable data, check that it is of the expected type.

[2016.05.04-10.11.55:201][ 76]LogLinker:Warning: The file ‘…/…/…/LoadTest/Content/Content/ArchVis/Materials/M_CoffeTable_MAT.uasset’ contains unrecognizable data, check that it is of the expected type.

Projectlauncher config for release:

Projectlauncher config for dlc:

在每个tick 中调用 SynchronousLoad 可以实现类似的异步方式,我之前用RequestAsyncLoad, 在编辑器中能用, 但在打包后的游戏中就会有问题,后来就用同步的 方式加载了。

你好,我现在也在做从pak文件中加载*.uasset,可以mount到指定的目录,但是最后加载*.uasset失败,还出现异常: 0xC0000005: 读取位置 0x0000000000000090 时发生访问冲突。掉用这个函数RequestAsyncLoad之后,并没有加载成功。像这样的情况,只能用RequestAsyncLoad函数加载*.uasset吗?

SynchronousLoad函数可以从pak中加载asset吗?

请教一个问题,我现在可以加载了,但是不知道怎么调用加载的asset?

哥,能看下我的代码哪错了么,加载总是返回null,我的PAK是通过UnrealPak.exe打包的

IPlatformFile& InnerPlatformFile = FPlatformFileManager::Get().GetPlatformFile();
	FPakPlatformFile* PakPlatformFile = new FPakPlatformFile();
	FPlatformFileManager::Get().SetPlatformFile(*PakPlatformFile);
	PakPlatformFile->Initialize(&InnerPlatformFile, TEXT(""));
	const FString PakFileName = FPaths::GameContentDir() + TEXT("DLC/test001.pak");
	FString MountPoint(TEXT("/Game/DLC/"));
	if (!PakPlatformFile->Mount(*PakFileName, 0, *MountPoint))
	{
		return;
	}
	FStreamableManager AssetLoader;
	FStringAssetReference r(TEXT("/Game/DLC/test001.uasset"));
	UObject* t = AssetLoader.SynchronousLoad(r);
	UStaticMesh* mMeshAsset = Cast< UStaticMesh>(t);
	SphereVisual->SetStaticMesh(mMeshAsset);

http://dorgon.horizon-studio.net/archives/693

use FStringAssetReference
UObject* tempObj = item.ResolveObject();

RequestAsyncLoad 这个接口我也一样没用对,具体是需要怎么去用?