I overridden the GetPrimaryAssetId function in the secondary asset and registered it in the Asset Manager.
These assets are created as Blueprint classes and we want to use them as PrimaryAsset.
However, when packaging, an error: error: registered primaryassetid error is output for the blueprints.
If you remove the has blueprintclass option, there will be no error, but chunk data will not appear. (It seems like I can’t find the assets)
public:
AMapObject();
virtual FPrimaryAssetId GetPrimaryAssetId() const override
{
return FPrimaryAssetId(FPrimaryAssetType("MapObject"), GetOutermost()->GetFName());
}
PackagingResults: Error: Registered PrimaryAssetId MapObject:BPP_Booth_Lemonade for asset /Game/Moon/ART/Environment/Asset_WorldObject/Building/Booth/BPP_Booth_Lemonade.BPP_Booth_Lemonade_C does not match object’s real id of MapObject:/Game/Moon/ART/Environment/Asset_WorldObject/Building/Booth/BPP_Booth_Lemonade! This will not load properly at runtime!