[Unity] Reliable Delay Time

0 like 0 dislike
211 views
I have 8 Spawners that are each delayed to start one after the other in sequence. In the editor everything syncs up correctly. However, in Unity each spawner's delay time is slightly off, randomly every time the effect is started. I can get the behavior close to the editor by pressing restart but not scriptable using .StopEffect(): .StartEffect()

How do I get around this and have a consistent delay time?
asked May 24, 2016 by FruehBird (190 points)

1 Answer

0 like 0 dislike

Hello,

The effects should behave exactly the same in the editor and in Unity. Maybe what makes your effects seem to be different is the loading time of your scene (if the "Play On Start" attribute is checked), which can make the first frame very long and can make your effect behave strangely (if the first frame takes 5 seconds and each one of your spawner gets activated 1 sec after the previous one, when your scene will start, the 5 first spawners will be active for example).

The "Restart" button on the PKFxFX components just does this internally:

fx.StopEffect();
fx.StartEffect();

If this doesn't seem to be the cause of your issue, you can send us a repro project to:
 support _at_ popcornfx _dot_ com

Hope this helps,

Cheers

 

answered May 24, 2016 by Paul (1,780 points)
...