瀏覽代碼

修复SceneType无法可视化的bug

tanghai 2 年之前
父節點
當前提交
76db8cd135

+ 6 - 0
Unity/Assets/Scripts/Editor/ComponentViewEditor/TypeDrawer/EnumTypeDrawer.cs

@@ -13,6 +13,12 @@ namespace ET
 
         public object DrawAndGetNewValue(Type memberType, string memberName, object value, object target)
         {
+            if (memberType == typeof (SceneType))
+            {
+                string sceneType = EditorGUILayout.DelayedTextField(memberName, value.ToString());
+                return EnumHelper.FromString<SceneType>(sceneType);
+            }
+            
             if (memberType.IsDefined(typeof (FlagsAttribute), false))
             {
                 return EditorGUILayout.EnumFlagsField(memberName, (Enum) value);

+ 1 - 1
Unity/Assets/Scripts/Hotfix/Client/LockStep/LSReplayUpdaterSystem.cs

@@ -3,7 +3,7 @@ using System;
 namespace ET.Client
 {
     [FriendOf(typeof(LSReplayUpdater))]
-    public static partial class LSReplayComponentSystem
+    public static partial class LSReplayUpdaterSystem
     {
         [EntitySystem]
         private static void Update(this LSReplayUpdater self)