I found the answer after reading up more on how the engine worked. I had been making an assumption that a Blueprint created from a custom class was “of that class” rather than a child inheriting from it.
This meant that in my C++ where I had specified HudClass = ASWHud::StaticClass();
I had expected it to run the blueprint graph in what was actually a child class Blueprint. This was a massive oversight on my part.
My eventual solution was to specify the Blueprint Class was to be used as the HUDClass in my ASWGameMode.cpp
I did this using the following code:
#include "Runtime/CoreUObject/Public/UObject/ConstructorHelpers.h"
ASWGameMode::ASWGameMode()
{
static ConstructorHelpers::FObjectFinder<UClass> BP_ASWHUD(TEXT("/Game/Blueprints/BP_MAINHUD.BP_MAINHUD_C"));
HUDClass = BP_ASWHUD.Object;
};
Thanks for all the help. Everyone’s input contributed to my eventual solution.