Skip to content

Commit 9557ed2

Browse files
fix: using "Visible" instead of "enabled" to make sure RNSM continues updating when off (#702)
1 parent a66cd3b commit 9557ed2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Additional documentation and release notes are available at [Multiplayer Documen
2121
*
2222
### Fixed
2323
* Subscribing to a message channel while unsubscribing is pending (#675)
24+
* Using ```Visible``` instead of ```Enabled``` to make sure RNSM continues updating when off (#702)
2425

2526
## [v1.3.0-pre] - 2022-06-23
2627

Packages/com.unity.multiplayer.samples.coop/Utilities/Net/RNSM/NetStatsMonitorCustomization.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@ public class NetStatsMonitorCustomization : MonoBehaviour
1212

1313
void Start()
1414
{
15-
m_Monitor.enabled = false;
15+
m_Monitor.Visible = false;
1616
}
1717

1818
void Update()
1919
{
2020
if (Input.GetKeyUp(KeyCode.S) || Input.touchCount == k_NbTouchesToOpenWindow && AnyTouchDown())
2121
{
22-
m_Monitor.enabled = !m_Monitor.enabled; // toggle
22+
m_Monitor.Visible = !m_Monitor.Visible; // toggle. Using "Visible" instead of "Enabled" to make sure RNSM keeps updating in the background
23+
// while not visible. This way, when bring it back visible, we can make sure values are up to date.
2324
}
2425
}
2526

0 commit comments

Comments
 (0)