You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 15, 2022. It is now read-only.
Latest Develop branch, commit cad82c4
Unity 2017.1.0f3
Windows 10
Expected behavior
RPC should be called on server, as well as clients.
Actual behavior
RPC is only called on clients.
Steps to reproduce
Call networkObject.SendRpc(RPC_NAME, Receivers.All) on server. Clients will receive RPC, but server will not.
You can workaround this by calling if (NetworkManager.Instance.IsServer) networkObject.SendRpc(NetworkManager.Instance.Networker.Me, RPC_NAME);
The text was updated successfully, but these errors were encountered:
I've narrowed this down a bit. I am calling the RPC immediately after instantiating the object, or in networkObject.networkStarted. Calling a non-targeted RPC in either of these places will fail, but calling a targeted RPC will succeed. I'm going to look at how these two cases are handled differently and see if I can find a fix.
Edit: Since I'm targeting the server from the server, it just calls InvokeRpcOnSelfServer, which works as expected, it's actual networked RPCs that aren't being sent, which I believe has been brought up in the past.
Issue creator has confirmed that this issue is resolved if the RPC is called inside of NetworkStart after creation (which should be intended behavior). This is resolved by issue creators pull request: #46
Version Number and Operating System(s)
Latest Develop branch, commit cad82c4
Unity 2017.1.0f3
Windows 10
Expected behavior
RPC should be called on server, as well as clients.
Actual behavior
RPC is only called on clients.
Steps to reproduce
Call
networkObject.SendRpc(RPC_NAME, Receivers.All)
on server. Clients will receive RPC, but server will not.You can workaround this by calling
if (NetworkManager.Instance.IsServer) networkObject.SendRpc(NetworkManager.Instance.Networker.Me, RPC_NAME);
The text was updated successfully, but these errors were encountered: