Quantcast
Viewing latest article 1
Browse Latest Browse All 4

Answer by whydoidoit

You have to start them as coroutines - normally Unity does that if you call it from within a MonoBehaviour. If you want a utility class then you are going to need a utility MonoBehaviour script to run the coroutines on. In other words you need a script that's purpose in life it to execute your coroutines from your library. It could be as simple as: #CoroutineSupport.js static var instance : CoroutineSupport = this; function RunCoroutine(coroutine : IEnumerator) { return StartCoroutine(coroutine); } Then to start a yielding library routine you would use: CouroutineSupport.instance.StartCoroutine(someCoroutineFunction());

Viewing latest article 1
Browse Latest Browse All 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>