Yes, it is initialized, because OnlineSessionInterface.IsValid()
is true
, and *(OnlineSubsystem->GetSubsystemName().ToString())
is “EOS”.
There is the following code in the constructor.
IOnlineSubsystem* OnlineSubsystem = IOnlineSubsystem::Get();
if (OnlineSubsystem == nullptr)
{
return;
}
OnlineSessionInterface = OnlineSubsystem->GetSessionInterface();
if (OnlineSessionInterface.IsValid())
{
if (GEngine)
{
GEngine->AddOnScreenDebugMessage(
-1,
15.f,
FColor::Blue,
FString::Printf(TEXT("Found subsystem %s"), *(OnlineSubsystem->GetSubsystemName().ToString()))
);
}
}
else
{
if (GEngine)
{
GEngine->AddOnScreenDebugMessage(
-1,
15.f,
FColor::Red,
FString(TEXT("Failed to get session interface!"))
);
}
}
It did print Found subsystem EOS
.