Hey everyone,
First time trying to upload a server to PlayFab Multiplayer Service. I have followed the instructions step by step until the Plugin GSDK installation with C++.
Before I could open my Dedicated Server "MyGameServer.exe -log" with log console and connect with client with no problem.
When going to next step to install Plugin GSDK with C++, I get told to create own game instance. After creating and coding as they show, I try to open it again and it just shutsdown.
Is it something I need to understand or do before open it? Or maybe not supposed to open it yet?
So I continued anyways to open it with LocalMultiplayerAgent.exe as they say in next step and here I am stuck, still just shutsdown.
I've been doing the same thing as the pages tell me to do over and over and it doesn't work.
Something I noticed is the code they are showing.
From UMyGameInstance to UThirdPersonGameInstance and it just gives errors when compiling because it doesnt exists, so I changed back to UMyGameInstance.
This is the code I mean:
void UMyGameInstance::OnStart() { UE_LOG(LogPlayFabGSDKGameInstance, Warning, TEXT("Reached onStart!")); UGSDKUtils::ReadyForPlayers(); } void UMyGameInstance::OnGSDKShutdown() { UE_LOG(LogPlayFabGSDKGameInstance, Warning, TEXT("Shutdown!")); FPlatformMisc::RequestExit(false); } bool UMyGameInstance::OnGSDKHealthCheck() { UE_LOG(LogPlayFabGSDKGameInstance, Warning, TEXT("Healthy!")); return true; } void UThirdPersonGameInstance::OnGSDKServerActive() { /** * Server is transitioning to an active state. * Optional: Add in the implementation any code that is needed for the game server when * this transition occurs. */ UE_LOG(LogPlayFabGSDKGameInstance, Warning, TEXT("Active!")); } void UThirdPersonGameInstance::OnGSDKReadyForPlayers() { /** * Server is transitioning to a StandBy state. Game initialization is complete and the game * is ready to accept players. * Optional: Add in the implementation any code that is needed for the game server before * initialization completes. */ UE_LOG(LogPlayFabGSDKGameInstance, Warning, TEXT("Finished Initialization - Moving to StandBy!")); } // Also it says to creat new Init if not exist. And also shows UThirdPersonGameInstance. is this right? void U[YourGameInstanceClassName]::Init() { FOnGSDKShutdown_Dyn OnGSDKShutdown; OnGSDKShutdown.BindDynamic(this, &UMyGameInstance::OnGSDKShutdown); FOnGSDKHealthCheck_Dyn OnGSDKHealthCheck; OnGSDKHealthCheck.BindDynamic(this, &UMyGameInstance::OnGSDKHealthCheck); FOnGSDKServerActive_Dyn OnGSDKServerActive; OnGSDKServerActive.BindDynamic(this, &UThirdPersonGameInstance::OnGSDKServerActive); FOnGSDKReadyForPlayers_Dyn OnGSDKReadyForPlayers; OnGSDKReadyForPlayers.BindDynamic(this, &UThirdPersonGameInstance::OnGSDKReadyForPlayers); UGSDKUtils::RegisterGSDKShutdownDelegate(OnGSDKShutdown); UGSDKUtils::RegisterGSDKHealthCheckDelegate(OnGSDKHealthCheck); UGSDKUtils::RegisterGSDKServerActiveDelegate(OnGSDKServerActive); UGSDKUtils::RegisterGSDKReadyForPlayersDelegate(OnGSDKReadyForPlayers); }