static void Main(string[] args) { Operations.AC_Test.TestAll(); Resources.roots = DummySceneGraph1.roots; // since this is the design copied from the Unity plugin, which has the main script thread effectively polling EvalAll() // ... just recreate the same situation // server listener thread is started implicitly in static constructor while (true) { Thread.Sleep(50); // 20 fps ShellServer.EvalAll(); } }
static void Update() { // "update".NLSend() ; if (ShellServer.EvalAll()) { if (!Application.isPlaying) { UnityEditor.SceneView.RepaintAll(); // during playmode scene Update happens regardless // unsurprisingly, this updates only the SceneViews - not, for example, inspectors // // UnityEditor.EditorApplication.QueuePlayerLoopUpdate(); // nor does this // f**k it - for now just live with inspectors not properly updating until the window gets to the foreground } } }