Skip to content

handling 2 Netcode For GameObjects NetworkManagers in one scene #295

Description

@navidhaghighi

Hello
We have 2 NetworkManager components , 1 for a lobby and 1 for voice chat.
we use Netcode for gameobjects integration.
It works completely fine on editor but doesn't work on android , what is the different between Editor and android?
After we connect to Dissonance server ,DissonanceSetup Doesn't show connected players anymore.
We have tested our network with only one NetworkManager and it works correctly.
before we use the second NetworkManager and instantiate DissonanceSetup object we shutdown the first networkmanager like this:

foreach (var networkObject in VoiceLobbyClientManager.Instance.GetComponent<NetworkManager>().SpawnManager.SpawnedObjectsList)
{
    if (networkObject != null)
    {
        Destroy(networkObject.gameObject);
    }
}

VoiceLobbyClientManager.Instance.GetComponent<UNetTransport>().DisconnectLocalClient();
VoiceLobbyClientManager.Instance.GetComponent<UNetTransport>().Shutdown();
VoiceLobbyClientManager.Instance.GetComponent<NetworkManager>().Shutdown();

Unity version : 2021.3.39f
Dissonance version : 9.0.4
Netcode for gameobject version : 1.9.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions