- 최신
- 최다 투표
- 가장 많은 댓글
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.
@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); }
}