There is a MainMenu. When you press a button “New Game”, a script will invoke
NetworkManager.Singleton.StartHost();
[...]
SceneManager.LoadScene("CampaignScene");
The host is started successfully.
In the CampaignScene, there is a CampaignManager-Object which is In-Scene placed. The CampaignManager has a component NetworkObject and a script of type NetworkBehaviour assigned to it. However, after the Scene is loaded, the CampaignManager is not spawned. The Start()-method is called, and Debug.Log(IsHost) shows that the host is NOT started. But the inspector clearly shows that the host is started and i could call
void Start() {
GetComponent<NetworkObject>().Spawn();
}
which would work on the host-side, but later on turns into problems with the client side…
I am lost here. Why is the CampaignManager not spawned? And why does it say IsHost == false??
Is this a bug or does it work as designed?