Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NetworkVariable with both Read&Write Permission set to Owner doesn't have its Value updated to Server #2094

Closed
sianzhan opened this issue Aug 1, 2022 · 2 comments
Assignees
Labels
priority:high stat:imported Issue is tracked internally at Unity type:bug Bug Report

Comments

@sianzhan
Copy link

sianzhan commented Aug 1, 2022

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

  1. Declare a NetworkVariable of any type T with both Read & Write Permission set to Owner.
    i.e. new NetworkVariable(default, NetworkVariableReadPermission.Owner, NetworkVariableWritePermission.Owner)
  2. Have two instance of game running, one join as Host, another one join as Client.
  3. Attempt to update the NetworkVariable on the Owner Client.
  4. 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: -
@sianzhan sianzhan added stat:awaiting triage Status - Awaiting triage from the Netcode team. type:bug Bug Report labels Aug 1, 2022
@ashwinimurt
Copy link
Contributor

Backlog MTT-4266

@NoelStephensUnity
Copy link
Collaborator

This issue was resolved in #2097

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:high stat:imported Issue is tracked internally at Unity type:bug Bug Report
Projects
None yet
Development

No branches or pull requests

3 participants