Can't create static mesh from code properly

I’ve made an inventory system, which keeps model paths inside items. I can’t seem to create the static meshes needed for the items properly, they dissappear and give me the wrong asset path.

Code for creating the mesh:

UStaticMesh* StaticMesh = CreateDefaultSubobject<UStaticMesh>( ModelPath );

How a modelpath looks:

__ItemData[ EItems::WEAPON_PISTOL ].ModelPath = TEXT("StaticMesh'/Game/Items/Crowbar/crowbarlow.crowbarlow'");

Reference path to item:


Asset path when an item is created, ingame (seems not to be working):


I don’t understand what I am missing. Can anyone enlighten me?

I should add that the reference path is to the asset, not the item.