Skip to content

Commit

Permalink
DontDestroyOnLoad AsyncManager instance in editor
Browse files Browse the repository at this point in the history
See #13
  • Loading branch information
muckSponge committed Sep 30, 2020
1 parent a26e675 commit cfd37ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions UnityAsync/Assets/UnityAsync/Manager/AsyncManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ static void Initialize()
fixedUpdates = new ContinuationProcessorGroup();

Instance = new GameObject("Async Manager").AddComponent<AsyncManager>();
if(!Application.isEditor) // DontDestroyOnLoad can not be called in editor mode
DontDestroyOnLoad(Instance);

DontDestroyOnLoad(Instance);
}

/// <summary>
Expand Down

0 comments on commit cfd37ae

Please sign in to comment.