Skip to content

Commit

Permalink
fix: Reload game config before starting game through ElympicsLobbyClient
Browse files Browse the repository at this point in the history
  • Loading branch information
Dawid Sygocki committed Apr 27, 2023
1 parent 409f936 commit d3ae1b0
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions Runtime/ElympicsSystems/ElympicsLobbyClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ private void Awake()
Instance = this;
DontDestroyOnLoad(gameObject);
SetClientSecret();
LoadConfig();
_config = ElympicsConfig.Load();
_gameConfig = _config.GetCurrentGameConfig();

_lobbyPublicApiClient = new UserApiClient();
_auth = new RemoteAuthenticationClient(_lobbyPublicApiClient);
Expand All @@ -66,12 +67,6 @@ private void Awake()
Authenticate();
}

private void LoadConfig()
{
_config = ElympicsConfig.Load();
_gameConfig = _config.GetCurrentGameConfig();
}

// ReSharper disable once MemberCanBePrivate.Global
/// <summary>
/// Performs authentication. Has to be run before joining an online match.
Expand Down Expand Up @@ -161,6 +156,7 @@ public void PlayOnline(float[] matchmakerData = null, byte[] gameEngineData = nu

private void SetUpMatch(JoinedMatchMode mode)
{
_gameConfig = _config.GetCurrentGameConfig();
MatchMode = mode;
}

Expand Down

0 comments on commit d3ae1b0

Please sign in to comment.