Hi, so I’m trying the new Network system of Unity, and I got some Issues, I can’t find a answer on internet, I’m trying to instanciante and Spawn GameObjects but I go this error :
SpawnObject for Map Manager(Clone) (UnityEngine.GameObject), NetworkServer is not active. Cannot spawn objects without an active server.
So I don’t know why Network server is not active, I got this error when I click on “LAN Host(H)” with the Network Manager HUD,
I’ve made this networkManager to instanciate my Managers on the server when the server is started :
using UnityEngine;
using UnityEngine.Networking;
using System.Collections;
public class NetworkManagerScript : NetworkManager {
public GameObject[] ListToSpawn;
public override void OnStartServer()
{
foreach(GameObject obj in ListToSpawn)
NetworkServer.Spawn(Instantiate(obj)as GameObject);
}
}
I don’t know why I got this error, probably something I’m doing wrong, I hope for a answer
Thanks