I’m working on a mobile game on Unreal Engine version 4.23. I’m using the inventory system from the Action RPG example project by Epic Games. I’m using a custom Asset Manager to load UPrimaryDataAssets called UItems.
The game is able to correctly save and load the inventory items by their PrimaryAssetId on PC (both packaged and ran in editor).
However, On android I get the logged error: “Failed to load item for identifier Item_Token!” The only item I have in the game so far is the token so this makes sense. But it shouldn’t be failing to find the item. Especially when I have it set to “Always Cook,” these types of items in the Asset Manager project settings.
It’s strange because the Item_Token seems to be working on Android if referenced from blueprints. I am able to successfully add and save the tokens. It successfully converts from DataAsset to PrimaryAssetId. But not the other way around.
I essentially copied all the code from the Action RPG game so I must have missed some setting. Is my directory wrong? Does it need to point to the c++ classes instead? Does anyone know what could have gone wrong?
Just tried packaging the Action RPG example project for android and it also won’t load the weapons or the souls on Android. So I think it has the same issue. Especially since I gave myself 500 souls and then clicked replay and had 0 souls again. But on PC, the souls are saved.
Edit: A newly created Action RPG project seems to work just fine on android (with saving and loading). So I must have changed some setting that made it no longer work on the Action RPG project I had modified before copying the code to another project.
I still don’t know what setting was changed though, since all I did was make a new map and reorganize the files. But I changed the directories in the Asset Manager project settings so it still worked on PC. But not on android for some reason.
It seems only the Epic staff will know what’s causing this issue.
I really need to be able to fix this so I can continue to make this mobile game and learn how the ability system and Inventory system work on the Action RPG game.
Yeah, I still don’t know why it did this. I tried using UObject files instead but it turns out those are “No Export Types” meaning I couldn’t make blueprint children. So my items need to either be entirely made from object class blueprint files or I need to get Primary Asset IDs working.
Sorry you had to have this conversation only with yourself, it’s discouraging. All this asset management stuff seems almost completely undocumented. I’m an ex-Unity developer having recently switched to Unreal, and everything was going great until I stared down into the abyss of figuring out how to only download the part of the app that’s needed. I have effectively hundreds of levels using different assets, and it would be impossible to download in one go. So now I’m struggling to understand this whole system. This is drastically better in Unity. I’m now seriously second-guessing my choice to ditch Unity, even if it means my app will never look as good as it would in Unreal. I’ve developed professionally for 20 years, but I don’t know if I have the IQ to get through this riddle.
Oh man, this is an old thread. I got asset management working, but I can’t remember how.
I know there’s a way to only download the parts of the game you need. They do that with Fortnite. I have a friend and former coworker who works at Epic Games. I’ll ask if they know how to do that or knows of any information about it.
Edit: I just realized your reply is from 4 years ago. I hope you were able to find some information. There are so many great avenues to get help now like the unreal developer discord server!
And here’s me again 3 years later. Yes, I’m all resolved. The chunked asset loading has also become more of a standard feature in the meanwhile, whereas when I was trying to solve it, it was all in a Fortnite namespace in the engine source. We have it working, but there’s no quick answer. It’s a whole system. But it’s streamlined and better documented now.