com.unity.netcode.gameobjects
com.unity.netcode.gameobjects copied to clipboard
ConnectionApproval spawn by prefabhash unusable
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:
- 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
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 Now that this is merged, is this issue resolved?
Resolved in #2437