Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

UNet Command saying that its not being executed on the server

$
0
0
I have a simple command, all that it should do is change the authority of the object that is passed to it. For some reason, even when run through command, AssignAuthority returns the error `AssignClientAuthority can only be call on the server for spawned objects. UnityEngine.Networking.NetworkIdentity:AssignClientAuthority(NetworkConnection) Player:CmdAssignAuthority(GameObject) (at Assets/Player/Game/Scripts/Player.cs:71)` Below is the code for the method: [Command] public void CmdAssignAuthority(GameObject obj) { obj.GetComponent().AssignClientAuthority(GetComponent().connectionToClient); }

Viewing all articles
Browse latest Browse all 2891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>