My previously working code is now suddenly broken. I get a KeyNotFoundException when trying to get the SessionId on a server.
My code looks like this:
string titleId = GameserverSDK.getConfigSettings()[GameserverSDK.TitleIdKey]; DeveloperApi.LogToText("titleId was: " + titleId); int port = GameserverSDK.GetGameServerConnectionInfo().GamePortsConfiguration.First().ClientConnectionPort; DeveloperApi.LogToText("Port was: " + port); string sessionId = GameserverSDK.getConfigSettings()[GameserverSDK.SessionIdKey]; // <--- this line errors with KeyNotFoundException DeveloperApi.LogToText("Session id was: " + sessionId);
The titleId prints correctly (B186).
The port prints as 0 (which sounds incorrect?)
The sessionId errors because it can't seem to find the key GameserverSDK.SessionIdKey (which is simply 'sessionId')
MockVMAgent looks like this:
https://i.imgur.com/nJ3qk2e.png
Why is this happening and what can I do to fix it?