Trying to send command for object without authority?
Hey everyone!
I've been slaving away for weeks on a card game project I decided to make as a learning experience for Unity. Took a while because I'm extremely new to Unity and the whole networking concept, which brings me to the problem here.
Each player gets auto-created through the Network Manager script, as a prefab which contains both a Network Identity (tried with and without local player authority) and a script, containing parts of the following code:
void LateUpdate ()
{
if (isClient && !isServer) {
CmdReduceDeck ();
}
}
[Command]
void CmdReduceDeck()
{
print ("Executed command successfully");
}
Now, whenever I launch two instances of the game, and the second player (not the host/server) connects, I get " Trying to send command for object without authority" in the client's debug log and, as expected, nothing on the server's end. What am I doing wrong?
I am facing same problem. I think there is bug in Unity HLAPI for Unity.
Your answer
Follow this Question
Related Questions
How to count score on all players from non player object 0 Answers
How do I get the true position (Vector 3) from a Network Transform Component(Unet)? 0 Answers
Day/Night cycle turns black at night and how to Serialize it rightly? 0 Answers
Photon Networking - How to move all players from game scene to current room scene? 0 Answers