Skip to content

Commit

Permalink
fix: fixing compile error with inspector in 2022
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Frowen committed Apr 3, 2023
1 parent 645570c commit cb7fa26
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions Assets/Mirage/Editor/NetworkBehaviourInspectorUIToolkit.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#if UNITY_2022_2_OR_NEWER // Unity uses UI toolkit by default for inspectors in 2022.2 and up.
using UnityEditor.UIElements;
using UnityEngine.UIElements;
using System.Globalization;
using UnityEditor.UIElements;
using UnityEngine;
using UnityEngine.UIElements;

namespace Mirage
{
Expand All @@ -14,7 +14,7 @@ public override VisualElement CreateInspectorGUI()

// Create the default inspector.
var iterator = serializedObject.GetIterator();
for (bool enterChildren = true; iterator.NextVisible(enterChildren); enterChildren = false)
for (var enterChildren = true; iterator.NextVisible(enterChildren); enterChildren = false)
{
var field = new PropertyField(iterator);

Expand All @@ -34,13 +34,6 @@ public override VisualElement CreateInspectorGUI()
root.Add(syncLists);
}

// Crete the sync settings editor.
var syncSettings = _drawer.CreateDefaultSyncSettings();
if (syncSettings != null)
{
root.Add(syncSettings);
}

return root;
}
}
Expand Down

0 comments on commit cb7fa26

Please sign in to comment.