[Fishnet] Replacement or fix for WaitForFixedUpdate()?

I asked on discord as well as searched and found someone else with this question, I haven’t seen an answer yet. It’s a bit obscure.

I have coroutines I use for some procedural generation, they rely on things being generated successively which use some colliders for detection. This generation is nonfunctional without WaitForFixedUpdate() within the coroutine, because the code can execute faster than colliders can be placed and then picked up by the code. Putting the Wait in there was the resolution before.

Now with Fishnet’s time manager running my physics, this Wait method doesn’t work the same or at all anymore. A little bandaid was just to put a WaitForSeconds(0.01f) in there which works but gives me the oogie boogies, it feels like an invitation for rare and sinister bugs to cause me hours of headache later down the line when I’ve long forgotten my current code. Not only that but it’s slower, although actually it shouldn’t be but I realized recently the WaitForFixedUpdate which I kept in IS actually causing some delay but not the way I expect it to, but FixedUpdate apparently runs at .02 seconds, but also my TimeManager tickrate is 60 which amounts to .01 again…

I’m hoping the answer is a simple one, I wanted a thread in case someone else searches for this later on like I did. Maybe there’s more to it than this, maybe it should be working fine and it’s a bug.

For reference, my TimeManager runs at 60 ticks currently.

If using time manager for your physics timing with most people do fixedupdate will not call, as I’m sure you’ve come to realize. You can wait frames and check if TimeManager.FrameTicked as one option.

1 Like