|
|
@@ -1,5 +1,8 @@
|
|
|
-using Model;
|
|
|
+using System;
|
|
|
+using Base;
|
|
|
+using Model;
|
|
|
using UnityEditor;
|
|
|
+using UnityEngine;
|
|
|
|
|
|
namespace MyEditor
|
|
|
{
|
|
|
@@ -10,6 +13,25 @@ namespace MyEditor
|
|
|
{
|
|
|
Game.EntityEventManager.Register("Model", typeof (Game).Assembly);
|
|
|
Game.EntityEventManager.Register("Editor", typeof (EditorInit).Assembly);
|
|
|
+
|
|
|
+ EditorApplication.update += Update;
|
|
|
+ }
|
|
|
+
|
|
|
+ private static void Update()
|
|
|
+ {
|
|
|
+ if (Application.isPlaying)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ try
|
|
|
+ {
|
|
|
+ Game.EntityEventManager.Update();
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ Log.Error(e.ToString());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|