updated to unity 2019.3.2f1, fix missing UNITY_EDITOR preprocessor

This commit is contained in:
Antonio
2020-02-27 19:14:02 +01:00
parent d639283f59
commit 7e26573abb
3 changed files with 25 additions and 9 deletions

View File

@@ -69,17 +69,19 @@ namespace UniRx.Async
static PlayerLoopSystem[] InsertRunner(PlayerLoopSystem loopSystem, Type loopRunnerYieldType,
ContinuationQueue cq, Type loopRunnerType, PlayerLoopRunner runner)
{
#if UNITY_EDITOR
EditorApplication.playModeStateChanged += (state) =>
{
if (state==PlayModeStateChange.EnteredEditMode || state==PlayModeStateChange.EnteredPlayMode) return;
if (state == PlayModeStateChange.EnteredEditMode ||
state == PlayModeStateChange.EnteredPlayMode) return;
if (runner != null)
runner.Clear();
if (cq != null)
cq.Clear();
};
#endif
var yieldLoop = new PlayerLoopSystem
{
type = loopRunnerYieldType,