From 21ef02614854d1daf105e57b88f8a4dde2f0bdb4 Mon Sep 17 00:00:00 2001 From: vis2k Date: Tue, 1 Jan 2019 15:06:57 +0100 Subject: [PATCH] NetworkBehaviourInspector.Init: simplify getfields --- Mirror/Editor/NetworkBehaviourInspector.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mirror/Editor/NetworkBehaviourInspector.cs b/Mirror/Editor/NetworkBehaviourInspector.cs index 5360132cd..d38fd4aa2 100644 --- a/Mirror/Editor/NetworkBehaviourInspector.cs +++ b/Mirror/Editor/NetworkBehaviourInspector.cs @@ -69,7 +69,7 @@ void Init(MonoScript script) } int numSyncLists = 0; - foreach (FieldInfo field in serializedObject.targetObject.GetType().GetFields()) + foreach (FieldInfo field in scriptClass.GetFields()) { if (field.FieldType.BaseType != null && field.FieldType.BaseType.Name.Contains("SyncList")) {