Quantcast
Channel: Questions in topic: "issue"
Viewing all articles
Browse latest Browse all 827

Probem when trying to create a coroutine

$
0
0
I am trying to create a coroutine, but for some reason visual studio doesn't like it, can somebody help me: public IEnumerator RespawnPlayerCo() { Instantiate(deathParticle, player.transform.position, player.transform.rotation); player.transform.position = currentCheckPoint.transform.position; player.GetComponent().velocity = Vector3.zero; Instantiate(respawnParticle, player.transform.position, player.transform.rotation); } It doesn't like the part where it says "RespawnPlayerCo" it says that not all code paths return a value.

Viewing all articles
Browse latest Browse all 827

Trending Articles



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