Unity-Technologies / com.unity.netcode.gameobjects

Netcode for GameObjects is a high-level netcode SDK that provides networking capabilities to GameObject/MonoBehaviour workflows within Unity and sits on top of underlying transport layer.
MIT License
2.1k stars 430 forks source link

KeyNotFoundException Unity.Netcode.ConnectionRequestMessage #2876

Open NecroMacro opened 2 months ago

NecroMacro commented 2 months ago

Description

Error on client side after connect: KeyNotFoundException: The given key 'Unity.Netcode.ConnectionRequestMessage' was not present in the dictionary.

Reproduce Steps

Screenshots

image

Environment

NecroMacro commented 2 months ago

I think the reason is this: i start client and server in awake method on custom script; NetworkManager not initialized yet; error

Anyway, NetworkManager dont have any events like "OnInitialized", or propertys like "IsInitialized". And I can't find out when the client or server can be started, this seems to be the root of the problem.