We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
public void RegisterRpcShoot() { PlayroomKit.RpcRegister("ShootLaser", HandleScoreUpdate, "You shot a bullet!"); Debug.Log($"Shoot function registered"); }
This is the register if you dont press register first the handlescoreupdate function is not called so the score is not updated
but the code inside the closure is still called:
public void ShootLaser() { var myPlayer = PlayroomKit.MyPlayer(); var index = players.IndexOf(myPlayer); score = playerGameObjects[index].GetComponent<RaycastGun>().ShootLaser(score); PlayroomKit.RpcCall("ShootLaser", score, PlayroomKit.RpcMode.OTHERS, () => { Debug.Log("Shooting bullet"); }); }
0.0.31beta
No response
https://discord.com/channels/867124708473700363/1234388527823982695/1292794001371566090
The text was updated successfully, but these errors were encountered:
momintlh
No branches or pull requests
What happened?
This is the register if you dont press register first the handlescoreupdate function is not called
so the score is not updated
but the code inside the closure is still called:
Version
0.0.31beta
What is your environment?
No response
Link to original discussion
https://discord.com/channels/867124708473700363/1234388527823982695/1292794001371566090
Relevant log output
The text was updated successfully, but these errors were encountered: