Skip to content

Commit 233a39e

Browse files
committed
fix: Missing inspector property in NetworkConfig
1 parent 7560f03 commit 233a39e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

MLAPI-Editor/NetworkingManagerEditor.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ public class NetworkingManagerEditor : Editor
2222

2323
// NetworkConfig fields
2424
private SerializedProperty protocolVersionProperty;
25+
private SerializedProperty allowRuntimeSceneChanges;
2526
private SerializedProperty networkTransportProperty;
2627
private SerializedProperty receiveTickrateProperty;
2728
private SerializedProperty maxReceiveEventsPerTickRateProperty;
@@ -99,6 +100,7 @@ private void Init()
99100

100101
// NetworkConfig properties
101102
protocolVersionProperty = networkConfigProperty.FindPropertyRelative("ProtocolVersion");
103+
allowRuntimeSceneChanges = networkConfigProperty.FindPropertyRelative("AllowRuntimeSceneChanges");
102104
networkTransportProperty = networkConfigProperty.FindPropertyRelative("NetworkTransport");
103105
receiveTickrateProperty = networkConfigProperty.FindPropertyRelative("ReceiveTickrate");
104106
maxReceiveEventsPerTickRateProperty = networkConfigProperty.FindPropertyRelative("MaxReceiveEventsPerTickRate");
@@ -136,6 +138,7 @@ private void CheckNullProperties()
136138

137139
// NetworkConfig properties
138140
protocolVersionProperty = networkConfigProperty.FindPropertyRelative("ProtocolVersion");
141+
allowRuntimeSceneChanges = networkConfigProperty.FindPropertyRelative("AllowRuntimeSceneChanges");
139142
networkTransportProperty = networkConfigProperty.FindPropertyRelative("NetworkTransport");
140143
receiveTickrateProperty = networkConfigProperty.FindPropertyRelative("ReceiveTickrate");
141144
maxReceiveEventsPerTickRateProperty = networkConfigProperty.FindPropertyRelative("MaxReceiveEventsPerTickRate");
@@ -322,6 +325,7 @@ public override void OnInspectorGUI()
322325

323326
EditorGUILayout.LabelField("Scene Management", EditorStyles.boldLabel);
324327
EditorGUILayout.PropertyField(loadSceneTimeOutProperty);
328+
EditorGUILayout.PropertyField(allowRuntimeSceneChanges);
325329

326330
EditorGUILayout.LabelField("Cryptography", EditorStyles.boldLabel);
327331
EditorGUILayout.PropertyField(enableEncryptionProperty);

MLAPI/Configuration/NetworkConfig.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ public class NetworkConfig
3434
public List<string> RegisteredScenes = new List<string>();
3535
/// <summary>
3636
/// Whether or not runtime scene changes should be allowed and expected.
37-
/// If this is true, clients with different initial configurations will not worth together.
37+
/// If this is true, clients with different initial configurations will not work together.
3838
/// </summary>
3939
[Tooltip("Whether or not runtime scene changes should be allowed and expected.\n " +
40-
"If this is true, clients with different initial configurations will not worth together.")]
40+
"If this is true, clients with different initial configurations will not work together.")]
4141
public bool AllowRuntimeSceneChanges = false;
4242
/// <summary>
4343
/// A list of spawnable prefabs

0 commit comments

Comments
 (0)