Searching for the right event function to use. Insight from Unity would be awesome!

I need an event function that is called after LateUpdate().

OnWillRenderObject() would be perfect if it wasn’t for not getting called when the objects are not visible.

I thought OnPreRender() could work although it required a script to be attached to the Camera but the killer on this one is the fact it is not called unless the Gameview is active and for an Editor Tool that doesn’t work.

Basically I need an event callback that occurs right before the scene is rendered just like OnWillRenderObject() or OnPreRender() which ideally would not require a script attached to a Camera which would also ignore visibility.

These two event function are so close but not close enough.

1 Like

Necroed because I hate to see good questions go unanswered. I’m also looking for something similar. I use the LateUpdate() to position the camera and I need to position world space UI elements (head-up-display HUD) afterward. I would prefer to keep the HUD scripts totally separate from the camera scripts. And putting stuff in the camera-specific events such as OnPreRender() seems like a messy way to do it.

It would be good to be able to create events and position them wherever needed amongst the event lineup.