NetworkBehaviourInspector: remove unused syncVarNames

This commit is contained in:
vis2k 2021-09-21 11:22:37 +08:00
parent 8c0bd9dca2
commit 7c28f06c8f

View File

@ -11,10 +11,6 @@ namespace Mirror
[CanEditMultipleObjects]
public class NetworkBehaviourInspector : Editor
{
/// <summary>
/// List of all visible syncVars in target class
/// </summary>
protected List<string> syncVarNames = new List<string>();
bool syncsAnything;
SyncListDrawer syncListDrawer;
@ -60,15 +56,6 @@ void OnEnable()
Type scriptClass = target.GetType();
syncVarNames = new List<string>();
foreach (FieldInfo field in InspectorHelper.GetAllFields(scriptClass, typeof(NetworkBehaviour)))
{
if (field.IsSyncVar() && field.IsVisibleField())
{
syncVarNames.Add(field.Name);
}
}
syncListDrawer = new SyncListDrawer(serializedObject.targetObject);
syncsAnything = SyncsAnything(scriptClass);