How to prevent older versions of the client from connecting to PhotonNetwork?

The whole answer can be found below.

Please note: The Photon forum is closed permanently. After many dedicated years of service we have made the decision to retire our forum and switch to read-only: we've saved the best to last! And we offer you support through these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation on PUN.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

How to prevent older versions of the client from connecting to PhotonNetwork?

matthewjd24
2020-07-18 20:26:00

Hi, I'm trying to figure out how I can prevent older versions of my game from connecting to the multiplayer server. Is there a way to set up my Photon Cloud app to only allow games with a certain version to connect? Or can I change the AppID of the application whenever I release a new version of the game, so the older versions won't connect? I assume there's an easy way to do this, thanks.

Matthew

Comments

Chr0my
2020-07-18 21:39:56

Hey Matthew,

I think there is a way to separate/prevent outdated clients to play with newer clients (depending on build)

I cannot open unity right now but you can change the game version in Photon. and you could even make a build that's only for testers this way.
You can either:

  1. set AppVersion from the Unity Editor, in the PhotonServerSettings ScriptableObject. That will be used as PhotonNetwork.GameVersion inside PhotonNetwork.ConnectUsingSettings()
  2. set PhotonNetwork.GameVersion after calling PhotonNetwork.ConnectUsingSettings()

Hope that helps.

matthewjd24
2020-07-18 21:49:35

Hi Chr0my, thanks for the reply!

If I understand what you're saying correctly, this would make it so players using the newer client would not be able to play with people running the old client, which is good. But I trying to figure out if there is a way I can just 'turn off' multiplayer access for those using the outdated client. If people were to be playing multiplayer, and I released a new version of the game, it seems like there would be no incentive for players to update their game (or they might not even know there's a new version!)

Chr0my
2020-07-18 22:00:51

Hmm...

The best way of notifying that there is a game update is by making a Web request to download an image and display it, so anytime the player boots up the game or comes back to the main lobby scene, the image will show, (the image could say "Ver 1.8 is out! Download now")

But I'm not aware of any method of shutting off a player to the multiplayer.

Chr0my
2020-07-18 22:04:01

Just noticed this post!

https://forum.photonengine.com/discussion/16536/how-to-check-if-a-user-needs-to-update#latest

matthewjd24
2020-07-18 22:12:51

Thanks! It seems like this isn't built into Photon itself, so I will have to do a little more learning on how to set this up, but at least I roughly know what I need to do now! Thanks again.

Back to top