-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add coroutine helper and bump version
- Loading branch information
1 parent
7b639b6
commit 9f70317
Showing
6 changed files
with
23 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
namespace Satchel | ||
{ | ||
public class CoroutineRunner : MonoBehaviour{} | ||
public static class CoroutineHelper{ | ||
private static GameObject gameObject; | ||
private static CoroutineRunner runner; | ||
public static CoroutineRunner GetRunner(){ | ||
if(runner == null){ | ||
if(gameObject == null){ | ||
gameObject = new GameObject(); | ||
GameObject.DontDestroyOnLoad(gameObject); | ||
} | ||
runner = gameObject.GetAddComponent<CoroutineRunner>(); | ||
} | ||
return runner; | ||
} | ||
} | ||
} |