Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Resolved network manager still listening even in singleplayer

Discussion in 'Netcode for GameObjects' started by miccalisto, Apr 16, 2023.

  1. miccalisto

    miccalisto

    Joined:
    Feb 20, 2018
    Posts:
    40
    I don't know how to somehow disable the networking manager, because I want to have a singleplayer mode, but when I test the singleplayer I get an error that network manager is listening and I have to start a server and the game breaks. But I don't want it to listen, I tried destrying the gameobject that has the networkmanager attached to it nad even the shutdown command and nothing worked. What do I have to do to disable it?
     
  2. miccalisto

    miccalisto

    Joined:
    Feb 20, 2018
    Posts:
    40
    I found out I have to add network prefabs to the network manager at runtime, depending on whether it's a singleplayer or multiplayer session. Doing so fixed the problem.