The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation on PUN.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

How to run a RPC Coroutine?

JXTQ
2021-07-22 13:29:11

Hi, I am trying to make a bullet script where 2 sounds play after the other after a certain amount of time after the bullet is shot so than all players can hear it but it seems like when I do photonView.RPC("Coroutine", RpcTarget.All) it does not work because it is not starting the coroutine and it just spams my console when it gets to the yield return new WaitForSeconds()

here is my code

This has been making me pull my hair out for ages and I am unsure how this would work

Comments

redi
2022-09-23 13:09:58

Probably it is not starting coroutine, cause u didn't call StartCoroutine for RPC_PlaySound. Does it work for DestroyBulletAfterTime ?

Back to top