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

ConnectionApproval spawn by prefabhash unusable

Open LukeStampfli opened this issue 3 years ago • 1 comments

Describe the bug The ConnectionApproval callback allows to pass back a prefab hash to spawn a specific prefab as the player object for the connection player. This is no longer possible by code since prefabs don't have a prefabHash anymore and GlobalObjectId is internal.

To Reproduce Steps to reproduce the behavior:

  1. Override the connection approval callback in the NetworkManager and try spawning a different player object with it.

Actual outcome It's not possible to do.

Expected outcome It should work or be removed

Environment (please complete the following information):

  • OS: Windows 10
  • Unity Version: 2020.3.12f1
  • Netcode Version: 1.0.0-pre.2

LukeStampfli avatar Oct 22 '21 11:10 LukeStampfli

This is a runtime only issue that requires the connection approval callback accepting a Network Prefab or that the GlobalObjectIdHash value is exposed as public read only and internally set. MTT-1645

NoelStephensUnity avatar Nov 01 '21 15:11 NoelStephensUnity

@NoelStephensUnity Now that this is merged, is this issue resolved?

RikuTheFuffs avatar Mar 24 '23 14:03 RikuTheFuffs

Resolved in #2437

NoelStephensUnity avatar Mar 24 '23 15:03 NoelStephensUnity