Pete_the_B
(Pete_the_B)
September 20, 2022, 7:48am
1
Hi,
I’m trying to load a primary asset defined in c++, but the asset manager refuses to find it. My simplified c++ definitions:
And the Asset Manager configuration:
Unfortunately, GetPrimaryAssetIdList blueprint node doesn’t find it. Can c++ primary assets be loaded in any way?
Sononeo
(Sononeo)
September 20, 2022, 11:51am
2
A long shot but maybe you could try something like this and see if it works?
FPrimaryAssetId UGameplayModifierDataAsset::GetPrimaryAssetId() const
{
FPrimaryAssetType PrimaryAssetType = FPrimaryAssetType("ModifierLabel");
FPrimaryAssetId PrimaryAssetId;
PrimaryAssetId.PrimaryAssetType = PrimaryAssetType;
return PrimaryAssetId;
}
It’s probably not the best way, but using GetFName in the past caused me problems, doing it this way omitted the need to use it and the names of data assets with this asset type would appear when getting the primary id asset list.
May work for you ¯_(ツ)_/¯