I am trying to run this code.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;
public class PlayerInput : NetworkBehaviour {
[Command]
void CmdSpawnThirdCamera()
{
var camSpawn = (Third_Camera)Instantiate(third_Camera);
NetworkServer.SpawnWithClientAuthority(camSpawn, connectionToClient);
}
}
But i get this message from unity ? any ideas
NetworkServer' does not contain a definition for
SpawnWithClientAuthority’