NetworkServer.Spawn spawns object with default settings

Hello, it’s my first time posting here. I’m trying out the new networking system and run into a small problem. Since i am still a beginner at Unity scripting, i am not sure how to solve it by myself.

I’m creating a board game, and i want to spawn fields for both players.

                Quaternion angle = Quaternion.Euler (270, 0, 0.0f);
				GameObject spawned_object = Instantiate(blue_tile_prefab_, position, angle) as GameObject;
				spawned_object.name = "TileBlue" + field_blue_counter;
				field_blue_counter++;
				spawned_object.transform.parent = blue_side_.transform;
				position += new Vector3(0.0f, 0.0f, -1.25f);
				NetworkServer.Spawn(spawned_object);

So this would spawn for the “Host player”, everything correctly with correct name,etc…
While on client, it would have prefab name and (clone) at the end, and wouldn’t get parented. I realize this is because the Spawn function doesn’t remember the GameObject but the prefab. So i guess i need to edit the spawned objects somehow, right?

This is a Command, as:

[Command]
void CmdFillField()...

The class of your spawned object must inherit from NetworkBehaviour and should have a method:

public override void OnStartClient()
{
    // you can do your things here, 
    // such as change the gameobject's name and assign its parent
}

If you want some fields on the object to be synced, use the [SyncVar] custom attribute on the said fields.