Unity control life cycle

Write picture description here
Write picture description here
rendering

OnPreCull: This function is called before the camera culls the scene. Objects visible to the camera depend on culling. The OnPreCull function call occurs before culling.
OnBecameVisible/OnBecameInvisible: This function is called when the object is visible/invisible to the camera.
OnWillRenderObject: This function is called once for each camera if the object is visible.
OnPreRender: This function is called before the camera starts rendering the scene.
OnRenderObject: This function is called after all normal scene rendering has completed. At this point, you can draw custom geometry using GL classes or Graphics.DrawMeshNow.
OnPostRender: This function is called after the camera has finished rendering the scene.
OnRenderImage (Pro version only): Call this function after the scene has finished rendering to post-process the screen image.
OnGUI: This function is called multiple times on each frame in response to GUI events. The program will first handle the Layout and Repaint events, and then handle the Layout and keyboard/mouse events for each input event.
OnDrawGizmos is used to draw small illustrations (Gizmos) in the scene view for visualization purposes.

Guess you like

Origin blog.csdn.net/zhaohuappc/article/details/71427394