Hi, I am attempting to asynchronously load a blueprint using FStreamableManager. However, when the callback is called, my TSoftObjectPointer’s Get() method is returning NULL. Is there something I’m missing?
In the code below, this results in a null deref:
SongBlueprint.Get()->GeneratedClass;
void USongDirectorComponent::BeginPlay()
{
Super::BeginPlay();
if (!StreamableManager)
{
StreamableManager = new FStreamableManager();
}
StreamableManager->RequestAsyncLoad(SongBlueprint.ToSoftObjectPath(), FStreamableDelegate::CreateUObject(this, &USongDirectorComponent::OnSongLoaded));
}
void USongDirectorComponent::OnSongLoaded()
{
FActorSpawnParameters spawnParams;
UClass *blueprintClass = SongBlueprint.Get()->GeneratedClass;
// other stuff ...
}