Which actions do send messages?
Options
Hello everyone,
I want to be sure if some things send messages. If yes, I can't use them every frame. But I want to know if I'm allowed to use certain things in Update() every frame without wasting messages.
To be more precise, I wonder if some things like these send messages to the server and count for the messages/s.
For example:
- if(PhotonNetwork.IsMasterClient)
- if(PhotonNetwork.InRoom)
- PhotonNetwork.PlayerList.Length
- PhotonNetwork.LocalPlayer.GetPhotonTeam() (Photon.Pun.UtilityScripts)
- PhotonNetwork.CurrentRoom.PlayerCount
- PhotonNetwork.LocalPlayer.ActorNumber
- Getting players from the PlayerList, for example: foreach(Player p in PhotonNetwork.PlayerList)
- And getting the team of another player, for example: somePlayer.GetPhotonTeam()
I would be very happy if someone could clear me up and tell me if these are dangerous for the traffic and the messages/s. The things listed above are the things I'm most using where I'm worried if they send messages or not. I assume that some of them don't send messages, but I am still not sure. I would like to hear that from someone who really knows it.
Thank you very very much!
I want to be sure if some things send messages. If yes, I can't use them every frame. But I want to know if I'm allowed to use certain things in Update() every frame without wasting messages.
To be more precise, I wonder if some things like these send messages to the server and count for the messages/s.
For example:
- if(PhotonNetwork.IsMasterClient)
- if(PhotonNetwork.InRoom)
- PhotonNetwork.PlayerList.Length
- PhotonNetwork.LocalPlayer.GetPhotonTeam() (Photon.Pun.UtilityScripts)
- PhotonNetwork.CurrentRoom.PlayerCount
- PhotonNetwork.LocalPlayer.ActorNumber
- Getting players from the PlayerList, for example: foreach(Player p in PhotonNetwork.PlayerList)
- And getting the team of another player, for example: somePlayer.GetPhotonTeam()
I would be very happy if someone could clear me up and tell me if these are dangerous for the traffic and the messages/s. The things listed above are the things I'm most using where I'm worried if they send messages or not. I assume that some of them don't send messages, but I am still not sure. I would like to hear that from someone who really knows it.
Thank you very very much!
0
Comments
-
Hi @Duck,- if(PhotonNetwork.IsMasterClient)
- if(PhotonNetwork.InRoom)
- PhotonNetwork.PlayerList.Length
- PhotonNetwork.LocalPlayer.GetPhotonTeam() (Photon.Pun.UtilityScripts)
- PhotonNetwork.CurrentRoom.PlayerCount
- PhotonNetwork.LocalPlayer.ActorNumber
- Getting players from the PlayerList, for example: foreach(Player p in PhotonNetwork.PlayerList)
- And getting the team of another player, for example: somePlayer.GetPhotonTeam()
If you check the code of each method / property, we just look up local client cached data.1