asadm / playroom-unity

9 stars 1 forks source link

Issue in RPC Registration #69

Closed SaadBazaz closed 1 month ago

SaadBazaz commented 1 month ago

What happened?

Hello, we found these errors when we play the project, how can we fix them? The first error appears when we play the scene "Game" and the second error appears when we press SPACE bar, to shoot bullets. The errors comes from GameManager

image

image

Version

0.0.21

What is your environment?

Unknown

Link to original discussion

https://discord.com/channels/997752993598419044/1239518994994561126

Relevant log output

image

SaadBazaz commented 1 month ago

@momintlh - So far, this seems due to our latest update.

Could this be due to the example not being updated, or is it a race condition where RPC is not registered properly before it is called? (Same race-condition scenario we discussed)

SaadBazaz commented 1 month ago

From @momintlh

To test RPC you need to build the game, this currently does not work in mock-mode

Developer:

That error gives me collateral problem when I wanna debug anything, I get the errors right there and I can't check nothing, the work-around that I found is disable the RpcRegister and debug

My questions:

momintlh commented 1 month ago
  • Is there a way we can build mock-mode for RPC?

Yes, we can simulate RPCs within the editor, basically registering a callback on RpcRegister() and calling it on RpcCall()

  • Until then, do we have a workaround for builders?

Nothing built-in, we can show a custom error for now.

SaadBazaz commented 1 month ago
  • Is there a way we can build mock-mode for RPC?

Yes, we can simulate RPCs within the editor, basically registering a callback on RpcRegister() and calling it on RpcCall()

  • Until then, do we have a workaround for builders?

Nothing built-in, we can show a custom error for now.

We can start by showing a simple error for now, and then can implement the RPC simulation for editor. How long do you think that'll take?

momintlh commented 1 month ago
  • Is there a way we can build mock-mode for RPC?

Yes, we can simulate RPCs within the editor, basically registering a callback on RpcRegister() and calling it on RpcCall()

  • Until then, do we have a workaround for builders?

Nothing built-in, we can show a custom error for now.

We can start by showing a simple error for now, and then can implement the RPC simulation for editor. How long do you think that'll take?

Shouldn't take that long.

SaadBazaz commented 1 month ago

Let's:

  1. Implement simple error. Make PR, release in next release
  2. Work on RPC simulation in a separate PR.

What say @momintlh ?

SaadBazaz commented 1 month ago

Resolved in #70