Hey! I'm making a pixel art 2D MMORPG using Netcode for Entities with a mix of DOTS, Monobehaviours, and UGS. It's been working fine for the last 3 years of development, but our team is currently changing our game architecture to something more scene-based. We used to have one big scene shared by both the client AND the server, and the main menu was just a canvas over the camera until the login occurred.
Now, we have a scene flow where each menu is separated by its own responsibility, and the game and instances are new scenes as well. The problem is: after this big change, the clients can't connect to the server. They try to, but no server message is received. Testing locally, we found that the client gets disconnected due to the following error:
[ServerWorld] RpcSystem received non-approval RPC Rpc[13806426237390676145, REDACTED_NAME_RPC] while in the Handshake connection state, from NetworkConnection[id0,v1]. Make sure you only send non-approval RPCs once the connection is approved. Disconnecting.
This happens right at the start of play in both worlds (the message is the same, but it starts with [ClientWorld] instead of [ServerWorld]). Our clients aren't even trying to connect — just the existence of the IRpcCommand is enough to break everything.
Notes:
- We tried commenting out everything related to the specified RPC, but then it pointed to another one, and the same behavior kept repeating until we had every IRpcCommand deleted.
- We couldn't find anything related to our issue on the internet.
- It only works when using the play mode tools on Client & Server. We even tried opening two different editors with clones of the project to test client vs. server, but the same issue occurred.
- No LLMs are capable of “understanding” our problem — they only point out situations where RPCs are actually sent during the handshake (while ours aren’t even added to an entity yet).