Skip to content

Commit 4839210

Browse files
authored
fix: Fixed NetworkVariable<float> not rendering properly in inspector (#2441)
* Fix: Fixed float NetworkVariables not being rendered properly in the inspector of NetworkObjects. * feat(documentation): added entry to changelog.md * chore: Update changelog (#2441)
1 parent 0b29662 commit 4839210

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

com.unity.netcode.gameobjects/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Additional documentation and release notes are available at [Multiplayer Documen
2727
- Fixed issue where `NetworkAnimator` would not check if its associated `Animator` was valid during serialization and would spam exceptions in the editor console. (#2416)
2828
- Fixed issue when the `NetworkSceneManager.ClientSynchronizationMode` is `LoadSceneMode.Additive` and the server changes the currently active scene prior to a client connecting then upon a client connecting and being synchronized the NetworkSceneManager would clear its internal ScenePlacedObjects list that could already be populated. (#2383)
2929
- Fixed issue where a client would load duplicate scenes of already preloaded scenes during the initial client synchronization and `NetworkSceneManager.ClientSynchronizationMode` was set to `LoadSceneMode.Additive`. (#2383)
30+
- Fixed float NetworkVariables not being rendered properly in the inspector of NetworkObjects. (#2441)
3031

3132
## [1.3.0]
3233

com.unity.netcode.gameobjects/Editor/NetworkBehaviourEditor.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ private void RenderNetworkVariableValueType<T>(int index, NetworkVariable<T> net
161161
{
162162
val = (ulong)EditorGUILayout.LongField(variableName, (long)((ulong)val));
163163
}
164+
else if (type == typeof(float))
165+
{
166+
val = (float)EditorGUILayout.FloatField(variableName, (float)((float)val));
167+
}
164168
else if (type == typeof(bool))
165169
{
166170
val = EditorGUILayout.Toggle(variableName, (bool)val);

0 commit comments

Comments
 (0)