Distinguish between versions
Hi,
I am using pun2 and self-hosted(server) in my project.
In Pun2 I can distinguish between versions with PhotonNetwork.GameVersion but not in self-hosted.
How can I distinguish between versions in self-hosted?
Can I do it using CustomRoomProperties?
Best Answer
-
The virtual application system is only for Clouds. Self-hosted does not support it. You would have to modify the server code in the LoadBalancing project to add this functionality. There are many ways to do this, you can do whatever works best for you. You can add a custom operation in
HivePeer.OnOperationRequest
or send the version data initially during connection and apply it to theirGameClientPeer
directly fromGameApplication.CreateGamePeer
. SQL lobbies are also an alternative, but unsafe.1
Answers
-
The virtual application system is only for Clouds. Self-hosted does not support it. You would have to modify the server code in the LoadBalancing project to add this functionality. There are many ways to do this, you can do whatever works best for you. You can add a custom operation in
HivePeer.OnOperationRequest
or send the version data initially during connection and apply it to theirGameClientPeer
directly fromGameApplication.CreateGamePeer
. SQL lobbies are also an alternative, but unsafe.1