-
Notifications
You must be signed in to change notification settings - Fork 465
Closed
Labels
type:supportQuestions or other supportQuestions or other support
Description
Description
Any update on this? I updated to Netcode v1.0.1 and IsOwner is false for my player objects during OnNetworkSpawn(). I've got a workaround for the few instances that I currently use this, but it's error prone and adds some complexity.
Reproduce Steps
- Create a new NetworkBehavior
- Override OnNetworkSpawn() with something like:
public override void OnNetworkSpawn()
{
base.OnNetworkSpawn();
Debug.Log($"IsOwner: {IsOwner}");
} - Create a prefab with the new NetworkBehavior script
- Make that prefab the default PlayerObject
- Start a host, observe the output of the OnNetworkSpawn() debug log line.
- Start a client, observe the output of the OnNetworkSpawn() debug log line.
Actual Outcome
The client log line is: "IsOwner: false"
Expected Outcome
The client log line is: "IsOwner: true"
Screenshots
N/A
Environment
- OS: Windows 10
- Unity Version: 2021.2.16f
- Netcode Version: 1.0.1
- Netcode Commit: [e.g. https://github.com/Unity-Technologies/com.unity.netcode.gameobjects/commit/ba418fa5b600ad9eb61fab0575f12fbecc2c6520]
Additional Context
This looks like a possible regression as IsOwner used to be set correctly during OnNetworkSpawn().
Metadata
Metadata
Assignees
Labels
type:supportQuestions or other supportQuestions or other support