NetworkBehaviourInspector.Init: simplify getfields

This commit is contained in:
vis2k 2019-01-01 15:06:57 +01:00
parent a57e23ea60
commit 21ef026148

View File

@ -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"))
{