Announcement

Collapse
No announcement yet.

How does an online subsystem obtains a world context?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How does an online subsystem obtains a world context?

    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:

    Code:
    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:

    Code:
    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?
Working...
X