This literally took me days, as it turn out that the timing offset between C++ and BP Init of GameIstance caused it to not be added as a GlobalObject to SPUD correctly.
19 lines
No EOL
445 B
C++
19 lines
No EOL
445 B
C++
#include "CustomAdvancedFriendsGI.h"
|
|
#include "Engine/World.h"
|
|
#include "Engine/Engine.h"
|
|
#include "SpudSubsystem.h"
|
|
|
|
void UCustomAdvancedFriendsGI::Init()
|
|
{
|
|
Super::Init();
|
|
|
|
if (GEngine)
|
|
{
|
|
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Green,
|
|
TEXT("CustomAdvancedFriendsGI::Init() called"));
|
|
}
|
|
|
|
GetSpudSubsystem(GetWorld())->AddPersistentGlobalObjectWithName(this, TEXT("ExampleGameInstance"));
|
|
|
|
|
|
} |