I’ve been searching for a solution in relation to ISM’s but this should apply to HISM’s as well, so for future peoples.
It is really good to create Blueprints of all your blueprintable classes and use ue macros to access and set references in BP, then use those references in C++ to spawn them/create them.
This is almost universal, and can be used on pretty much anything you can access in the editor.
The idea is to create an assignable reference in your code for the bp to allow you to select it from a drop down in editor.
public: // or protected // or private (but you need to use meta=(AllowPrivateAccess = "true"), in the uproperty macro)
UPROPERTY(EditAnywhere, BlueprintReadWrite)
UstaticMesh* yourStaticMesh;
this is the most basic form it can have. You can pretty much replace the type with whatever you like. TSubclassOf<UClass> is a really powerful one, if you want to select any child or parent and use that.
The great thing about this is that you completely avoid constructor helpers, and references being hard coded into your game .
On a final note, for h/ism’s, I’ve found that assigning the mesh and even the material doesn’t work for me in the constructor, so I’ve ended up doing it in PostInitializeComponents() instead. I think this makes sense, since the references arent live until they’re loaded, and they might not be ready while all constructors are still running.