Parcourir la source

fix:修复抛异常时访问了一个为空的变量的bug (#324)

ChocolSauerkraut il y a 3 ans
Parent
commit
a4d4118c37
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      Unity/Codes/Model/Core/Object/EventSystem.cs

+ 2 - 2
Unity/Codes/Model/Core/Object/EventSystem.cs

@@ -159,7 +159,7 @@ namespace ET
                 IEvent obj = Activator.CreateInstance(type) as IEvent;
                 if (obj == null)
                 {
-                    throw new Exception($"type not is AEvent: {obj.GetType().Name}");
+                    throw new Exception($"type not is AEvent: {type.Name}");
                 }
 
                 Type eventType = obj.GetEventType();
@@ -732,4 +732,4 @@ namespace ET
             instance = null;
         }
     }
-}
+}