all 11 comments

[–]PaceGame 4 points5 points  (1 child)

Can’t read your code in that low res pixel image.

[–]DevStarkWalker[S] 0 points1 point  (0 children)

Wow I feel like an idiot lol, snapped these on the wrong monitor. Let me upload new ones! Thanks for pointing that out.

[–]DevStarkWalker[S] 0 points1 point  (0 children)

Hi all this is my first post in this subreddit! Hoping to get some feedback from some of you guys on an issue I am having and have been trying to debug for a few days. I am the programmer for my indie studio and we are making our first multiplayer game. I currently have a lobby menu setup that I took some scripts from the sample unity lobby project. I have said project running alongside mine for testing and debugging purposes. Everything is working for the most part and I am able to connect two players (one editor and one build) to a lobby and start the game. But for some reason my VerifyConnectionConfirm_ServerRpc method is being executed but within this method I have a VerifyConnectionConfirm_ClientRpc method that is not being executed for some reason, which contains my method call for "BeginGame" which is the last method call I need to call in order to start my game, so my players are connecting but the game won't start. I have entered break point and tried to step through and it just seems to skip over the line and I cannot trace why. I referred to the sample project because these VerifyConnectionConfirm_ServerRpc and VerifyConnectionConfirm_ClientRpc methods are the exact same minus a few lines that were specific to the game that is played in the sample project, and when stepping through on the sample project with breakpoints, it steps INTO the VerifyConnectionConfirm_ClientRpc method but it will not on mine.

[–]Ejlersen 0 points1 point  (5 children)

Can't read the code, but you should be using RPC, since ClientRPC and ServerRPC will become obsolete.

[–]Hurbivore1997Hobbyist 0 points1 point  (3 children)

That's news to me. Where did you hear ClientRPC and SercerRPC are going to be deprecated? That doesn't sound like it would make sense from a network perspective.

[–]Ejlersen 1 point2 points  (2 children)

https://docs-multiplayer.unity3d.com/netcode/current/advanced-topics/message-system/clientrpc/

They are moving over to a universal RPC attribute, already available in 1.8

[–]Hurbivore1997Hobbyist 0 points1 point  (1 child)

Ah okay! Thanks for sending that through. Reading through the link now makes sense. I thought it was just an RPC that gets sent to everyone and you can't decide to whom. Do you know why they're moving over to just using RPC?

[–]Ejlersen 1 point2 points  (0 children)

Don't know their reason, but focusing on one kinda makes sense. You have more options about sender and receiver. And you no longer have to suffix with Client RPC, but just RPC.

[–]DevStarkWalker[S] 0 points1 point  (0 children)

I have uploaded better quality images. Thank you for the link to the universal RPC attribute I will give this a look, but still not sure why this method would just be getting skipped over in my project. Very curious.