I need to run GetPortFromNetDriver(Subsystem.GetInstanceName()). The instance name resolves to my custom online subsystem name.
Following the GetPortFromNetDriver method I see it uses:
UWorld* World = GetWorldForOnline(InstanceName);
Which in the end will try to find a world context using my online subsystem instance name as the world context handle:
FWorldContext* UEngine::GetWorldContextFromHandle(const FName WorldContextHandle)
{
for (FWorldContext& WorldContext : WorldList)
{
if (WorldContext.ContextHandle == WorldContextHandle)
{
return &WorldContext;
}
}
return nullptr;
}
Should there be a world context with a handle associated with my online subsystem?
If so, how does the flow works?