File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed
testproject/Assets/Tests/Manual
SceneTransitioningAdditive Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,16 @@ public class NetworkManagerMonitor : MonoBehaviour
1010 // Start is called before the first frame update
1111 private void Start ( )
1212 {
13- var networkManagerInstances = FindObjects . FindObjectsByType < NetworkManager > ( ) ;
13+ #if UNITY_6000_4_OR_NEWER
14+ var networkManagerInstances = FindObjectsByType < NetworkManager > ( ) ;
15+ #else
16+ #if UNITY_2023_1_OR_NEWER
17+ var networkManagerInstances = FindObjectsByType < NetworkManager > ( FindObjectsSortMode . None ) ;
18+ #else
19+ var networkManagerInstances = FindObjectsOfType < NetworkManager > ( ) ;
20+ #endif
21+ #endif
22+
1423 foreach ( var instance in networkManagerInstances )
1524 {
1625 if ( instance . IsListening )
Original file line number Diff line number Diff line change @@ -348,7 +348,15 @@ private void ShowHideObjectIdLabelClientRpc(bool isVisible)
348348 {
349349 m_LabelEnabled = isVisible ;
350350 NetworkObjectLabel . GlobalVisibility = m_LabelEnabled ;
351- var labels = FindObjects . FindObjectsByType < NetworkObjectLabel > ( ) ;
351+ #if UNITY_6000_4_OR_NEWER
352+ var labels = FindObjectsByType < NetworkObjectLabel > ( ) ;
353+ #else
354+ #if UNITY_2023_1_OR_NEWER
355+ var labels = FindObjectsByType < NetworkObjectLabel > ( FindObjectsSortMode . None ) ;
356+ #else
357+ var labels = FindObjectsOfType < NetworkObjectLabel > ( ) ;
358+ #endif
359+ #endif
352360
353361 foreach ( var label in labels )
354362 {
You can’t perform that action at this time.
0 commit comments