-
Notifications
You must be signed in to change notification settings - Fork 463
Closed
Labels
stat:importedStatus - Issue is tracked internally at UnityStatus - Issue is tracked internally at Unitytype:bugBug ReportBug Report
Description
Description
Public Float and double networkvariables are visually broken in the editor, even if marked NonSerialized. Workaround is to set them internal if possible.
Reproduce Steps
- Create new project
- Install NGO 1.6.0
- Create a new gameobject and add a script "TestScript", NetworkBehaviour
- Add in a public float or double NetworkVariable (actually doesn't matter if this is serialized or nonserialized)
- Save and go back to editor.
- Unselect and reselect the gameobject, note the console becomes filled with errors about InvalidCastException and "Test Script" is visually broken in the editor.
Actual Outcome
Setting variables in the editor becomes unusable for the entire script (not limited to networkvariables).
Expected Outcome
Not that
Screenshots
Environment
- OS: Windows 10
- Unity Version: [e.g. 2022.2.21f1]
- Netcode Version: [e.g. 1.6.0]
Additional Context
using System;
using Unity.Netcode;
public class TestScript : NetworkBehaviour
{
[NonSerialized] public NetworkVariable<float> SomeFloat = new NetworkVariable<float>();
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
stat:importedStatus - Issue is tracked internally at UnityStatus - Issue is tracked internally at Unitytype:bugBug ReportBug Report
