https://metaplay.io logo
Managing different Configs in different environmen...
# questions-and-feedback
d
Hi, I'm wondering how I can use different configs spreadsheets in different environments? Ideally i'm thinking of having a spreadsheet per environment. Is that feasable? Thanks Andre
j
Check out the example https://docs.metaplay.io/feature-cookbooks/game-configs/implementing-google-sheets-integration.html#configuring-fetching-sheets how to have "Development sheet" and "Release sheet". So you could declare all environments/sheets in the GameConfigBuildIntegration, and then choose the correct when you are building in either in Unity Unity->Menu->Metaplay->GameConfig Build Window or in LiveOps dashboard Dashboard->Sidepane->Game Config->New Build. Note that nothing really ties the game configs in this example to the actual enviroment, so if you build Develop sheet and publish it into Production, there are no seatbelts. So at the moment you need to be careful. Also you need be aware that when you build the Server, the current GameConfig in the repository is included in the build server image. The default logic in server is to use this built-in gameconfig if it's never been used in that environment before. So if you build an image with Develop sheet, and deploy this Server image to Production environment, the default rules would automatically use this GameConfig. (The logic attempts to choose the newest). In the upcoming Metaplay Release33 this behavior becomes configurable.
d
to overcome this would i just need to ensure the latest config deployed to prod it newer that the built into the server image?
j
IIRC the login in R32 and earlier is: if the game config included in the docker image has not been seen before by the server or it's newer than the previous version it auto updated to, then pick the one from the image. If you don't want to use the game config in the docker image, the easiest is to set
System.StaticGameConfigPath
to null or an empty string and it should just skip the whole thing (haven't tested this though)