How to use synched Coroutine with waitForSeconds?
Options
Hi,
I am implementing a bullet, and I need to destroy it after a certain time if it hasn't yet hit anything, so I found TrueSyncManager.SyncedStartCoroutine that's fine, however I am hesitant to use this because I can't find any dedicated "WaitForSeconds" class that accept a FP instead of a float.
What is the best way to use SyncedStartCoroutine ? I could not find any examples on this.
Bye,
Jean
I am implementing a bullet, and I need to destroy it after a certain time if it hasn't yet hit anything, so I found TrueSyncManager.SyncedStartCoroutine that's fine, however I am hesitant to use this because I can't find any dedicated "WaitForSeconds" class that accept a FP instead of a float.
What is the best way to use SyncedStartCoroutine ? I could not find any examples on this.
Bye,
Jean
0
Comments
-
You have to use it like this:
yield return 5f;
(so omitting the WaitForSeconds and instead directly returning a constant float or FP.)
As stated here:
forum.photonengine.com/discussion/8913/how-to-use-coroutines-on-a-timer-within-truesync
Hope this helps,
John2 -
Hi,
Very good, thanks for the post link, I searched with the wrong keywords
bye,
Jean-1