breaking: InspectorHelper.IsVisibleSyncObject renamed to IsVisibleInInspector. universal.

This commit is contained in:
vis2k 2021-09-25 16:11:45 +08:00
parent 323b357a94
commit 8298a2556b
2 changed files with 2 additions and 2 deletions

View File

@ -68,7 +68,7 @@ public static bool HasShowInInspector(this FieldInfo field)
return fieldMarkers.Length > 0;
}
public static bool IsVisibleSyncObject(this FieldInfo field)
public static bool IsVisibleInInspector(this FieldInfo field)
{
return field.IsPublic || HasShowInInspector(field);
}

View File

@ -31,7 +31,7 @@ public SyncObjectDrawer(UnityEngine.Object targetObject)
syncObjectFields = new List<SyncObjectField>();
foreach (FieldInfo field in InspectorHelper.GetAllFields(targetObject.GetType(), typeof(NetworkBehaviour)))
{
if (field.ImplementsInterface<SyncObject>() && field.IsVisibleSyncObject())
if (field.ImplementsInterface<SyncObject>() && field.IsVisibleInInspector())
{
syncObjectFields.Add(new SyncObjectField(field));
}