Async Load primary asset class won't work after packing!

I have three levels(level1,level2,level3) and a loadingLevel,
Default map is level1.
Each level will asyn load a primary asset class and spawn it on the begin player section.
Level1 is a cube_blueprint, level2 is a cone_blueprint, level3 is a Cylinder_Blueprint.

This all works fine in editor mode.
But none of thie level will spawn any bp after a shipping or develpment build.
I have alreay uncheck is editor only in the asset manager section of project setting.
Please Help me! thanks!
(sorry about my english.)

I have attached a project which can show my case.link text

Anyone here?

Hello luochuanyuewu, to use the AssetManager in production you need to make sure your classes implement GetPrimaryAsset as described in the documentation. In your example project you are using normal Actor blueprints, which do not implement that function. To do this you must make a c++ class that implements that function. You have two options to get this working:

  1. Make a subclass of UPrimaryDataAsset that has a pointer to your blueprint of AActor, then load that PrimaryDataAsset subclass
  2. Make a subclass of AActor that implements virtual FPrimaryAssetId GetPrimaryAssetId() const itself, then blueprint that

Using the asset manager without making any native classes is currently not possible, but we may add support for it in a future version.

Hey luochuanyuewu-

Sorry for the late reply. Thank you for submitting a bug report. I have reproduced this issue and logged a report for it here Unreal Engine Issues and Bug Tracker (UE-50507) . You can track the report’s status as the issue is reviewed by our development staff. Please be aware that this issue may not be prioritized or fixed soon.

Cheers

I added some code today that will make it possible to Blueprint PrimaryDataAsset in 4.19, Allow Blueprint Classes to derive from UPrimaryDataAsset - Feedback for Unreal Engine team - Unreal Engine Forums has more details

Looks like this won’t even be fully functional in UE 4.19 from the forum thread.
This should totally be in the documentation for these nodes. I mean come on: A functionality that works during debugging a project but not in the final version? What good is it?

I am lucky that I looked into this whole dynamic LoadAsset thing now as an experiement. I was ready to change all my asset loading that I do with fixed references to this because it sounds good on the surface. I spend 2 days experimenting and getting it all right, because the documentation on this is so thin, and luckily I did a test run with shipping. Then I was lucky again to find this post here which seems to be pretty much the only spot here on the website that mention this flaw.

This should absolutely be in the documentation for the BP nodes to safe people like myself the bother of even considering this a viable solution.

Hey,

In case it helps you or someone else, here’s a working solution in C++ without using the GetPrimaryAsset thing (i opened a BR for a different problem and finaly figured out it was the same old problem again, see my final answer).

https://answers.unrealengine.com/questions/729231/requestasyncload-cant-find-assets-in-packaged-game.html

Cheers

Cedric