Skip to content

Commit c867868

Browse files
committed
fix: Fixed RecycleNetworkIds inspector
1 parent bc6118d commit c867868

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

MLAPI-Editor/NetworkingManagerEditor.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ public class NetworkingManagerEditor : Editor
3636
private SerializedProperty ensureNetworkedVarLengthSafetyProperty;
3737
private SerializedProperty forceSamePrefabsProperty;
3838
private SerializedProperty usePrefabSyncProperty;
39+
private SerializedProperty recycleNetworkIdsProperty;
40+
private SerializedProperty networkIdRecycleDelayProperty;
3941
private SerializedProperty rpcHashSizeProperty;
4042
private SerializedProperty loadSceneTimeOutProperty;
4143
private SerializedProperty enableEncryptionProperty;
@@ -110,6 +112,8 @@ private void Init()
110112
ensureNetworkedVarLengthSafetyProperty = networkConfigProperty.FindPropertyRelative("EnsureNetworkedVarLengthSafety");
111113
forceSamePrefabsProperty = networkConfigProperty.FindPropertyRelative("ForceSamePrefabs");
112114
usePrefabSyncProperty = networkConfigProperty.FindPropertyRelative("UsePrefabSync");
115+
recycleNetworkIdsProperty = networkConfigProperty.FindPropertyRelative("RecycleNetworkIds");
116+
networkIdRecycleDelayProperty = networkConfigProperty.FindPropertyRelative("NetworkIdRecycleDelay");
113117
rpcHashSizeProperty = networkConfigProperty.FindPropertyRelative("RpcHashSize");
114118
loadSceneTimeOutProperty = networkConfigProperty.FindPropertyRelative("LoadSceneTimeOut");
115119
enableEncryptionProperty = networkConfigProperty.FindPropertyRelative("EnableEncryption");
@@ -144,6 +148,8 @@ private void CheckNullProperties()
144148
ensureNetworkedVarLengthSafetyProperty = networkConfigProperty.FindPropertyRelative("EnsureNetworkedVarLengthSafety");
145149
forceSamePrefabsProperty = networkConfigProperty.FindPropertyRelative("ForceSamePrefabs");
146150
usePrefabSyncProperty = networkConfigProperty.FindPropertyRelative("UsePrefabSync");
151+
recycleNetworkIdsProperty = networkConfigProperty.FindPropertyRelative("RecycleNetworkIds");
152+
networkIdRecycleDelayProperty = networkConfigProperty.FindPropertyRelative("NetworkIdRecycleDelay");
147153
rpcHashSizeProperty = networkConfigProperty.FindPropertyRelative("RpcHashSize");
148154
loadSceneTimeOutProperty = networkConfigProperty.FindPropertyRelative("LoadSceneTimeOut");
149155
enableEncryptionProperty = networkConfigProperty.FindPropertyRelative("EnableEncryption");
@@ -300,6 +306,13 @@ public override void OnInspectorGUI()
300306
EditorGUILayout.PropertyField(forceSamePrefabsProperty);
301307
EditorGUILayout.PropertyField(usePrefabSyncProperty);
302308

309+
EditorGUILayout.PropertyField(recycleNetworkIdsProperty);
310+
311+
using (new EditorGUI.DisabledScope(!networkingManager.NetworkConfig.RecycleNetworkIds))
312+
{
313+
EditorGUILayout.PropertyField(networkIdRecycleDelayProperty);
314+
}
315+
303316
EditorGUILayout.LabelField("Bandwidth", EditorStyles.boldLabel);
304317
EditorGUILayout.PropertyField(rpcHashSizeProperty);
305318

0 commit comments

Comments
 (0)