Skip to content

Commit

Permalink
Added CID override for dedicated server builds to support sample rele…
Browse files Browse the repository at this point in the history
…ase flow and update DefaultEngine.ini for BEAMPROJ_HathoraDemo
  • Loading branch information
PedroRauizBeamable committed May 17, 2024
1 parent dd0634c commit 35df226
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,18 @@ void UBeamRuntime::Initialize(FSubsystemCollectionBase& Collection)
// - If we got an CLI Arg called --beamable-realm-override <Target Realm's PID>, use this argument.
// - If there's no CLI Arg, check for an environment variable called BEAMABLE_REALM_OVERRIDE and use that if it exists.
// - If there's no EnvVar, we'll use whatever was configured in "Config/DefaultEngine.ini" (which is edited by using the "Apply To Build" button).
//

// We do this so game-makers can choose their preferred ways of setting up dedicated server builds and deployments.
FString OverridenCustomer;
if (!FParse::Value(FCommandLine::Get(), TEXT("beamable-customer-override"), OverridenCustomer))
{
OverridenCustomer = FPlatformMisc::GetEnvironmentVariable(TEXT("BEAMABLE_CUSTOMER_OVERRIDE"));
if (!OverridenCustomer.IsEmpty())
{
GetMutableDefault<UBeamCoreSettings>()->TargetRealm.Cid = FBeamCid{OverridenCustomer};
}
}

// We do this so game-makers can choose their preferred ways of setting up dedicated server builds and deployments.
FString OverridenRealm;
if (!FParse::Value(FCommandLine::Get(), TEXT("beamable-realm-override"), OverridenRealm))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ GlobalCacheConfiguration=(Mode=Disabled,Time=0.000000,ShouldInvalidateCacheDeleg
+RuntimeUserSlots=Player0
+DeveloperUserSlots=MainEditorDeveloper
bPersistRuntimeSlotDataWhenInPIE=True
TargetRealm=(Cid=(AsString="1731504735486980",AsLong=1731504735486980),Pid=(AsString="DE_1731504735486983"))
TargetRealm=(Cid=(AsString="1731504735486980",AsLong=1731504735486980),Pid=(AsString="DE_1743192982278144"))
bAutomaticFrictionlessAuthForOwnerPlayer=False
RequestTrackerCleanUpInterval=300.000000
bErrorIfGameplayTagNotFound=False
Expand Down

0 comments on commit 35df226

Please sign in to comment.