Tuesday, October 27, 2015

Unity Update call order

I wanted to clear a flag I had at the end of a frame for physics collisions. This mean't I did not want to clear this variable when physics updates were perhaps taking place as it could end up clearing in the middle, which would be pretty useless.

So I tried to find something, using who knows what keywords. I wasn't really finding what I wanted, though I did find lots of information and several posts by people offering advice (most was correct as well). Still I wanted something simple, something obvious.

Then I found EXACTLY what I wanted: A Diagram...

http://docs.unity3d.com/Manual/ExecutionOrder.html

That document shows the update stages used in Unity3D. Fabulous and obvious huh! the other benefit for me is that describe other sequenced calls that I was unaware of like the 'OnEnable()' call. That could be useful at some point.

Laters all,
Da Voodoochief

No comments:

Post a Comment