mirror of
https://github.com/Cysharp/UniTask.git
synced 2026-05-16 12:00:10 +00:00
updated to unity 2019.3.2f1, fix missing UNITY_EDITOR preprocessor
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user