Description
Network Variable with both ReadPerm = NetworkVariableReadPermission.Owner and WritePerm = NetworkVariableWritePermission.Owner doesn't have the value updated from Owner Client to Server.
Reproduce Steps
- Declare a NetworkVariable of any type T with both Read & Write Permission set to Owner.
i.e. new NetworkVariable(default, NetworkVariableReadPermission.Owner, NetworkVariableWritePermission.Owner)
- Have two instance of game running, one join as Host, another one join as Client.
- Attempt to update the NetworkVariable on the Owner Client.
- Print out the resulting NetworkVariable Value on Server.
Actual Outcome
The Value of NetworkVariable has been updated on the Owner Client side, but on the Server side, it remains the default value.
Expected Outcome
The Value of NetworkVariable on the Server side should be synced to the Value of Owner Client side, according to netcode documents (https://docs-multiplayer.unity3d.com/netcode/current/basics/networkvariable/index.html) as well as the comment inside "NetworkVariableReadPermission.cs" (Line 13: /// Only the owner and the server can read).
Environment
- OS: Windows10
- Unity Version: 2021.3.6 LTS
- Netcode Version: Version 1.0.0 - June 29, 2022
- Netcode Commit: -
Description
Network Variable with both ReadPerm = NetworkVariableReadPermission.Owner and WritePerm = NetworkVariableWritePermission.Owner doesn't have the value updated from Owner Client to Server.
Reproduce Steps
i.e. new NetworkVariable(default, NetworkVariableReadPermission.Owner, NetworkVariableWritePermission.Owner)
Actual Outcome
The Value of NetworkVariable has been updated on the Owner Client side, but on the Server side, it remains the default value.
Expected Outcome
The Value of NetworkVariable on the Server side should be synced to the Value of Owner Client side, according to netcode documents (https://docs-multiplayer.unity3d.com/netcode/current/basics/networkvariable/index.html) as well as the comment inside "NetworkVariableReadPermission.cs" (Line 13: /// Only the owner and the server can read).
Environment