com.unity.netcode.gameobjects icon indicating copy to clipboard operation
com.unity.netcode.gameobjects copied to clipboard

KeyNotFoundException Unity.Netcode.ConnectionRequestMessage

Open NecroMacro opened this issue 1 year ago • 1 comments

Description

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

Reproduce Steps

  • Scene 1 - Client - default Networkmanager without changes
  • Scene 2 - Server - default Networkmanager without changes
  • Start server
  • Start client
  • Client side error

Screenshots

image

Environment

  • OS: Windows 11
  • Unity Version: 2022.3.12f1 LTS
  • Netcode Version: Netcode for GameObjects 1.6.0
  • Netcode Commit: idk

NecroMacro avatar Apr 09 '24 16:04 NecroMacro

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.

NecroMacro avatar Apr 09 '24 16:04 NecroMacro