InvalidAuthentication error from NetworkRunner.StartGame()

Options

I am trying to set the FixedRegion so that all my testers can be in the same server, but I am getting an InvalidAuthentication error when I call NetworkRunner.StartGame().

This is the code snippet:

[code]

    public Task<StartGameResult> StartSimulation(

      NetworkRunner runner,

      GameMode gameMode,

      string sessionName

     )

    {

      AppSettings settings = new AppSettings();

      settings.FixedRegion = "us;";

      settings.AppIdRealtime = "<redacted>";

      settings.AppVersion = "1.0";


      return runner.StartGame(new StartGameArgs()

      {

        SessionName = sessionName,

        GameMode = gameMode,

        SceneManager = runner.gameObject.AddComponent<NetworkSceneManagerDefault>(),

        Scene = SceneManager.GetActiveScene().buildIndex,

        DisableClientSessionCreation = true,

        CustomPhotonAppSettings = settings,

      }); ;

    }

[/code]

Best Answer

  • Uthon
    Uthon
    Answer ✓
    Options

    NFMynster on Discord gave me the solution:


          var appSettings = PhotonAppSettings.Instance.AppSettings.GetCopy();

          appSettings.FixedRegion = "us";

Answers

  • Uthon
    Uthon
    Answer ✓
    Options

    NFMynster on Discord gave me the solution:


          var appSettings = PhotonAppSettings.Instance.AppSettings.GetCopy();

          appSettings.FixedRegion = "us";