0

I'm using Unity2018.2 on Windows 10.

This is a piece of my script. The script is NetworkBehaviour and the gameobject has a Network Identity with Local Player Authority.

This is in the Update method:

if (isClient && !isServer)
        {
            ready = true;
            foreach (Transform child in spawnerVideo)
            {
                if (!child.GetComponent<CheckIfReady>().ready)
                {
                    ready = false;
                }
            }

            if (ready)
            {
                if (!isLocalPlayer)
                {
                    return;
                }
                CmdReady();
            }
        }

And outside the Update Method:

[Command]
void CmdReady()
{
    test ++;
    Debug.Log("TEST");
}

In the editor I've the Host and in another pc the build with the client. All the other stuff that I'm using that involve the Unet connection work perfectly. In the editor nothing happens but it should increase the test variable and print "TEST".

Am I missing something? Thank you!

Programmer
  • 121,791
  • 22
  • 236
  • 328
G. Threepwood
  • 454
  • 8
  • 23

0 Answers0