Length of bufferedRPC stack
Options
Hello
Is there any restriction of bufferredRPC stack?
For example:
This is switching gun function
[PunRPC]
void SwitchGun(string gunID) {
}
So lets switch gun 1000 times, 1000 calls will be in new player(right?)
New player join the game ang got 1000 calls,
How can I limit the size of stack, or new buffered function call replace previous call
Is there any restriction of bufferredRPC stack?
For example:
This is switching gun function
[PunRPC]
void SwitchGun(string gunID) {
}
So lets switch gun 1000 times, 1000 calls will be in new player(right?)
New player join the game ang got 1000 calls,
How can I limit the size of stack, or new buffered function call replace previous call
0
Best Answer
-
Hi @NarekMart001,So lets switch gun 1000 times, 1000 calls will be in new player(right?)
New player join the game ang got 1000 calls,
Yes, that's right. But as long as these calls are only 'switch gun' commands that's bad, because you don't want to know how many times a players has switched his gun in the game, you only want to know which weapon he has currently equipped.How can I limit the size of stack, or new buffered function call replace previous call
I think you can't. You can only define what on the stack is by sending only buffered RPCs whereat the buffering is important, e.g. manual instantiation. Buffered RPCs gets destroyed when the matching object gets destroyed, too. E.g. PhotonNetwork.Instantiate(...) is buffered. If PhotonNetwork.Destroy(...) is called on this previously created object, the buffering will be also removed from the server, because it is no longer needed.5
Answers
-
Hi @NarekMart001,So lets switch gun 1000 times, 1000 calls will be in new player(right?)
New player join the game ang got 1000 calls,
Yes, that's right. But as long as these calls are only 'switch gun' commands that's bad, because you don't want to know how many times a players has switched his gun in the game, you only want to know which weapon he has currently equipped.How can I limit the size of stack, or new buffered function call replace previous call
I think you can't. You can only define what on the stack is by sending only buffered RPCs whereat the buffering is important, e.g. manual instantiation. Buffered RPCs gets destroyed when the matching object gets destroyed, too. E.g. PhotonNetwork.Instantiate(...) is buffered. If PhotonNetwork.Destroy(...) is called on this previously created object, the buffering will be also removed from the server, because it is no longer needed.5