Quantcast
Channel: Latest Questions by zenforhire
Viewing all articles
Browse latest Browse all 83

Stopping a selected coroutine

$
0
0
Hi All, Trying to stop a selected coroutine of the same method. Is there a stop method to pass in a handle to a thread? public IEnumerator crossFadeThread( AudioSource fadeOut, AudioSource fadeIn, float duration ) { ... } StartCoroutine( crossFadeThread( sourceA, sourceB, 5.0f) ); StartCoroutine( crossFadeThread( sourceC, sourceD, 10.0f) ); StartCoroutine( crossFadeThread( sourceE, sourceF, 7.0f) ); OR using string method StartCoroutine( "crossFadeThread", ... ); StartCoroutine( "crossFadeThread", ... ); StartCoroutine( "crossFadeThread", ... ); StopCoroutine( "crossFadeThread" ); Thanks

Viewing all articles
Browse latest Browse all 83

Trending Articles



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