I have a dedicated server setup running from “DebugGame Server executable”, and I have this code, where I would like to access a blueprint by its path name, so that I can access its TSubclassOf property.
FString WeaponPath = "/Game/Weapons/Blueprint/Attachments/MyAwesomeWeapon"
UBlueprint* WeaponBlueprint = Cast<UBlueprint>(StaticLoadObject(UObject::StaticClass(), NULL, *WeaponPath));
if (WeaponBlueprint)
{
AMyAwesomeWeapon* WeaponObject = Cast<AMyAwesomeWeapon>(WeaponBlueprint->GeneratedClass->ClassDefaultObject);
if (WeaponObject)
{
TSubclassOf<class AMyAwesomeWeapon> WeaponClass = WeaponObject->GetClass();
When I run this code on the clients, I can find “MyAwesomeWeapon” blueprint. But when I run this code on the dedicated server, the UBlueprint object returns NULL. So it seems that blueprints assets are not on the dedicated server??
How would I access UBlueprint Objects on Dedicated Servers?
If it helps, I packaged my dedicated server using “DebugGame Server” mode