- Home /
ServerRPC requires Owner
When i try to call a ServerRPC to update the clients position it gives me an error saying "Client Trying to call a ServerRPC that requires ownership" Please Help:
Code:
Player: https://gdl.space/dusumigaqe.cs
Manager: https://gdl.space/yuyiziqune.cs
Answer by A-Moreira · Aug 26, 2021 at 04:12 PM
Hi, I don't know if you managed to solve it but in case you are trying to call an RPC that requires ownership from a NetworkObject that is not owned by you, you need to add (RequireOwnership = false) on the method mark. Instead of [ServerRpc], use [ServerRpc(RequireOwnership = false)] on the line before the method.
Answer by TheriaGames · Dec 11, 2021 at 05:46 AM
Thanks!! I was looking for this answer. If anyone is still paying attention, I don't see this mentioned anywhere in the documentation, how did you know the answer? Can you link the documentation you are using?
Seems thats an issue that has yet to be fixed, I'd guess the answer is just encountering the issue in the past: https://issueexplorer.com/issue/Unity-Technologies/com.unity.multiplayer.docs/295
Your answer
Follow this Question
Related Questions
Unity networking tutorial? 6 Answers
Alternative to RPC for destroying objects across a network 0 Answers
[Photon] Getting the players in a room in the same order 1 Answer
NetworkBehaviour scripts are not seen in Unity3D, if i import them from external DLL. 0 Answers
Can we use Unitys LLAPI to establish a socket connect with a server? 1 Answer