Download

Passing a session to client?

hi guys,

so i have an issue, im using beacons and i want the host to create a game session and get the clients to join.
so i created a game session but couldnt figure how to pass the sessionresult to the clients.

i have a function which passes a const FblueprintSessionResult& and im trying to make it on the server with the
getNamedSession, but when it gets to the clients through a run on client function it doesnt seem to work
with the join sessions

the logs say its a bad session so i can only assume that it isnt replicating as id expect…
does anyone know how to get a client to join without out using the send invite function…?

thanks

##############################################################
Edit
##############################################################
Just for an update i thought i would paste in some code



    UFUNCTION(client, reliable)
    virtual void clientJoinGame(const FBlueprintSessionResult& SearchResult);  


which implements



  void AMyClass::clientJoinGame_Implementation(const FBlueprintSessionResult& SearchResult)  {  
    MyGameInstance* OwningGI = (MyGameInstance*)(GetWorld()->GetGameInstance());  
    if (OwningGI == nullptr) {  
        DO("Invalid Game Instance");  
        return;  
    }    
    OwningGI->BPClientJoinGame(SearchResult);  
  }


The BPCLientJoinGame is just a blueprint implementable function that calls a “JoinGame” node with the search result

the function i have that calls this is as follows



 void AMyHostClass::PartyJoinGame(const FBlueprintSessionResult& SearchResult) {  
    for (int i = 0; i < ClientActors.Num(); i++) {  
        AMyClass* Actor = (AMyClass*)ClientActors*;
        Actor->clientJoinGame(SearchResult);  
    }  
    return;
 }


And currently how im building the Search result is as follows



  SessionInterface = Online::GetSessionInterface();
    if (SessionInterface.IsValid()) {
        FNamedOnlineSession* result = SessionInterface->GetNamedSession(GameSessionName);
        FOnlineSession resp = (FOnlineSession)*result;  
        FOnlineSessionSearchResult f = FOnlineSessionSearchResult();
        f.Session = resp;  
        MySession.OnlineResult = f;  
    }


Does anyone have any ideas at all? do you need more information? I am not very good at forums