Closed as not planned
Closed as not planned
Description
Describe the bug
When a NetworkPrefab spawns, OnNetworkSpawn() callback on child NetworkBehaviours are not getting called, when the child itself also contains a NetworkObject.
To Reproduce
Steps to reproduce the behavior:
- Spawn a NetworkObject prefab that contains a child NetworkObject with a NetworkBehaviour.
- Notice that on spawn, the NetworkBehaviour's OnNetworkSpawn() callback is not invoked on NetworkBehaviours.
Actual outcome
The child NetworkBehaviours are never initialized via the network.
Expected outcome
Child NetworkBehaviours should have their OnNetworkSpawn() invoked.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
- OS: [e.g. Windows 10]
- Unity Version: [2020.3]
- Netcode Commit: [https://github.com/Unity-Technologies/com.unity.netcode.gameobjects/commit/14fd79d4e6bb8875e33325062958d8590b25539a]
Additional context
Add any other context about the problem here. Logs, code snippets would be useful here but please also consider attaching a minimal Unity project that reproduces the issue.