Hi all, I want to configure shared configuration variables for my multiplayer game.
I am using dedicated game server hosting (Multiplay), which calls a Cloud Code module endpoint. The cloud code module endpoint then calls Remote Config to fetch the current configuration for game configuration variables.
The reason why I want to do it this way is, that the game server and the players share the configuration.
I have the use case of computing elo scores after a match in cloud code. Also I need to show elo scores according to server-side business logic (in cloud code) to the players during gameplay.
Is this conceptional a bad thing?
I am asking because I couldn't find out how to fetch the remote config from within cloud save, if the request originates from a dedicated server context, and not a player context.
This means that the cloud code module does not have an AccessToken but only a ServiceToken in such context.
Is it correct that RemoteConfig is not supposed to be called in a service account context, like a dedicated game server in multiplay?
What would be a proper approach, assuming mine is wrong?
I am currently using the following, which does not work:
ServerAuthenticationService.Instance.SignInWithServiceAccountAsync - to sign in on the dedicated game server
Cloud Code services API (https://cloud-code.services.api.unity.com/v1) - to call the cloud code module endpoints with a service account
IRemoteConfigSettingsApi - within cloud code, to fetch the remote config -> this is not possible as it requires an AccessToken and I only have a ServiceToken coming from my service account
Best