I have a local multiplayer game working with NetworkView component, networkView.RPC() functions and [RPC].
Since the 5.1, RPC is obsolete and then I want to convert my code.
I’ve found that I can replace [RPC] with [ClientRpc] but is it possible to replace networkView.RPC() code line too? and with what? I can’t find it on docs or forums.
EDIT: I’ve learned about UNET but if there is a way to just replace my actual code without start over, I’ll take it!
I got it to work for my movement code, but I am worried I will have to rewrite my chat system for a 5th time… each time I rewrite it takes longer instead of shorter to do…
I know what you mean, I think game engines are trying to change themselves to “let artists create gameplay without any code” but then that SCREWS the programmers because usually it makes it take even more code for us to do the same thing. Programmers are who create the gameplay. I don’t see that changing any time soon. Game engines should cater to them. Graphic artists already have their programs to cater to them, Maya, etc
Game engines should only do such things when it doesn’t negatively impact the programming side. But taking more code to do the exact same thing is always a fail
I do like the new networking system besides how RPC’s are done. Legacy was so much easier, shorter and cleaner especially when I wanted everyone to receive an RPC. Now the only way I can figure out to do it is with 2 different functions. Just bring a similar way to do RPCMode.all back and I’ll be happy.
The legacy RPC method was doing the same thing - it just abstracted it away for you. IE - RPCMode.All routed through the server; but the behavior was inconsistent. Calling an RPC on a specific player didn’t work from client-to-client and you had to explicitly route it through the server yourself. At least the new system is consistent.
RPCMode.all and the old Network.Destroy() are insecure. Allowing a method for clients to do things on other clients makes it possible for clients to cheat. The networking HLAPI has a security model that requires server validation of requests from clients so that cannot happen.
Unet was deprecated a couple years back, and the HLAPI portion was removed from the core editor and moved to a package for those still using it. If you’re just starting a new network game project, choose an alternative network implementation.
No i would like to put an old 2017.1 project on WebGL, but i can’t build because of the depreaceted RPC so if i have too update this project, i wanna do it on 2019 unity version but rewrite all of code it was too hard for those kind of project :/.
If you like Unet then I might suggest Mirror, since it is originally based on the public Unet code base but differs in that it actually gets bug fixes and improvements.
I have to upgrade a project from 2017 to 2020 is there way I can install the old networking in the 2020 editor. I have installed the HLAPI but it still doesn’t work. Do I have to rewrite the entire networking to mirror or other framework?