SessionCompleteDelegates not firing?

First post since the new site so apologies if the formatting is broken or nonsensical.

In the UE5 multiplayer course with Kaan, in the online subsection bit,

if(SessionInterface.IsValid())//Tshared ptrs have a built in .IsValid() function
            PrintString("Session interface is valid!");
            SessionInterface->OnCreateSessionCompleteDelegates.AddUObject(this, &UMultiplayerSessionsSubsystem::OnCreateSessionComplete); //& before function to get address of function function is now bound to this delegate


and the subsequent function

void UMultiplayerSessionsSubsystem::OnCreateSessionComplete(FName SessionName, bool WasSuccessful)
    PrintString(FString::Printf(TEXT("OnCreateSessionComplete: %d"), WasSuccessful));

Never seem to fire.

When I run the program from the batch file and click on create server I can see the cmd screen dump session settings, but the game never seems to print out the bound delegate function.
I’m scratching my head wondering if this is a steam issue or a code issue.
Is there any way for me to debug this to see if it’s not completing correctly?

Hi artie and welcome to the community.

Just a few things to check before we get too caught up.

Are you using a steam config or null OSS?

Which version of unreal are you using?

Have you deleted the binaries and intermediate folders and rebuilt.

Lastly, try a packaged build and see if that works.

This may take a little back and forth to resolve but we will get there.

1 Like

Hi, thank you. <3
Using a packaged build worked.
Do you know why this is the case?

I had this issue. When I created the CoopAdventure project I forgot to enable the plugin for steam OSS.

This prevented it working from command line.

Other things you can try is the -nosteam Switch and also exiting steam as this sometimes interferes with the OSS.

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms