Unreal Engine 4.23 Networking not ready in GameMode

0

In 4.23 IpNetDriver is starting after Gamemode it seems and I am unable to run more then 1 server on an instance since I don't have the port available in GameMode to send to Gamelift. Has Anyone figured out a work around for this. I.e. a place to call the Gamelift Server SDK code instead of GameMode that runs after the Networking is setup?

질문됨 4년 전181회 조회
2개 답변
0

I am sorry you are having problems. Have pinged a few people to see if they have any thoughts but I am not sure anyone has encountered this.

I would suggest asking on the Unreal forums as this is specific to Unreal start up order.

You can separate the InitSDK and ProcessReady calls in the GameLift Server SDK/Unreal Plugin, so it should be possible to wait for IpNetDriver to complete its set-up. You may need to implement an event or similar to listen for.

답변함 4년 전
0

@REDACTEDUSER

Try to create gameInstanceSubsystem, and onMapLoadedFinished initialize gameLiftSDK:

Something like this:

/**

  • Author: Tahir Slezovic */

#include "UMyGameInstanceSubsystem.h" #include "AwsFunctionLibrary.h" #include "Engine/World.h"

void UMyGameInstanceSubsystem::Initialize(FSubsystemCollectionBase& Collection) { Super::Initialize(Collection);

FCoreUObjectDelegates::PreLoadMap.AddUObject(this, &UFBGameInstanceSubsystem::OnMapLoadStarted); FCoreUObjectDelegates::PostLoadMapWithWorld.AddUObject(this, &UFBGameInstanceSubsystem::OnMapLoadFinished);

GLog->Log("Initialize GameInstance Subsystem"); }

void UMyGameInstanceSubsystem::Deinitialize() { Super::Deinitialize();

FCoreUObjectDelegates::PreLoadMap.RemoveAll(this); FCoreUObjectDelegates::PostLoadMapWithWorld.RemoveAll(this);

GLog->Log("SUBSYSTEM Deinitialize GameInstance Subsystem"); }

void UMyGameInstanceSubsystem::OnMapLoadStarted(const FString & MapName) { GLog->Log("SUBSYSTEM GameInstance Subsystem Map Load Started " + MapName);

}

void UMyGameInstanceSubsystem::OnMapLoadFinished(UWorld * LoadedWorld) { GLog->Log("SUBSYSTEM GameInstance Subsystem Map Load Finished, RUNNING ON PORT: " + FString::FromInt(LoadedWorld->URL.Port));

if (LoadedWorld->IsServer()) { UAwsFunctionLibrary::InitializeGameLift(LoadedWorld->URL.Port); }

}

답변함 4년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠