Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

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.