[Command] not being called from client

I am using the lobby manager asset as the basis for my project which is a two-player, turn-based board game.

In my “Play Scene” I have two “Spawner” GOs sitting in it, one for each player.
The “Spawner” GOs each have a network identity set to local player authority.
At run-time, by clicking on a “Spawner” a [Command] method is called.
REMINDER: The “Spawner” object is sitting in the hierarchy and not network instantiated.

The [Command] method works fine when called on the Host, but when called on the Client, the [Command] method is never executed. I know I’m missing something obvious, so any help is appreciated.

Code snippets are below.
Thanks.

Help Mr. Wizard!

HERE IS THE CODE SNIPPET:
Note: “Cmd_SpawnPieces” is seen in the console when clicked on the host, but never seen when clicked on the client. And, no object is instantiated when clicked from the client either, obviously.

	void OnMouseDown()  {
		Debug.Log("OnMouseDown");

		Cmd_SpawnPieces();
	}

	[Command]
	void Cmd_SpawnPieces() {
		Debug.Log("Cmd_SpawnPieces");

	GameObject GO = (GameObject)NetworkBehaviour.Instantiate(<parameters here>);

             NetworkServer.Spawn(GO);
	}

does this script have a network identity attached to it and you shouldn’t use networkbehaviour.instantiate thats old networking .
also your script should be networkbehaviour not monobehaviour .

Also command will be called on the host/server , so the debug.log wont show up on the client at all.
the object will be spawned though

Yes, there is a network identity. When I run the host from the editor there is still no debug and no object is instantiated.

This is a dupe of my “Comment” because I didn’t know if the system alerted people to “Comments”.

The proper process in UNet is first to Instantiate the gameObject and then to call NetworkServer.Spawn.

The object Prefab must first be registered by either using the NetworkManager component’s relevant dragboxes or manually calling RegisterPrefab.

Edit:

You should be able to Spawn without Client Authority. You only need this if you want the client to take control of the object after it has been Spawned. For example I use this to Spawn Client Bullets.

An object like an Enemy Spawner should only be operated by the server with the Client making ‘ques’ to the Spawner to indicate readiness. Such an object Should have a Network Identity.

The part of the whole CMD process you are missing is the part at which the Syncing actually occurs. When you Invoke a Cmd function the Arguments of that function are actually transmitted across the network to the server in order that the arguments match. This is how the Server knows which information to use in the Client invoked function.