VIRTUOS_Playground/VIRTUOS_ExpansionPluginTests/Source/VRExpPluginExample/Private/CustomAdvancedFriendsGI.cpp
Simeon Wallrath 362b5ff23f C++ Implementation GameInstance save, also some cleanup of unsued C++ classes
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.
2025-12-11 17:22:52 +01:00

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"));
}