IOnlineSession::CreateSession

Creates an online session based upon the settings object specified.

Windows
MacOS
Linux

References

Module

OnlineSubsystem

Header

/Engine/Plugins/Online/OnlineSubsystem/Source/Public/Interfaces/OnlineSessionInterface.h

Include

#include "Interfaces/OnlineSessionInterface.h"

Syntax

bool CreateSession
(
    int32 HostingPlayerNum,
    FName SessionName,
    const FOnlineSessionSettings & NewSessionSettings
)

Remarks

Creates an online session based upon the settings object specified.

online session registration is an async process and does not complete until the OnCreateSessionComplete delegate is called.

Returns

true if successful creating the session, false otherwise

Parameters

Parameter

Description

HostingPlayerNum

the index of the player hosting the session

SessionName

the name to use for this session so that multiple sessions can exist at the same time

NewSessionSettings

the settings to use for the new session

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss