Skip to main content

Put it all together - Play with friends - (Unreal Engine module)

Last updated on March 22, 2024

Connect the UI to invite friend to game session

  1. Open the InviteToGameSessionWidget_Starter CPP file and navigate to InviteToSession function. Add the highlighted lines in the following code:

    void UInviteToGameSessionWidget::InviteToSession()
    {
    const UFriendData* FriendData = GetFriendDataFromParentWidget();
    if (!FriendData)
    {
    return;
    }

    Subsystem->SendGameSessionInvite(GetOwningPlayer(), FriendData->UserId);

    ...
    }

Resources