Execution sequence of functions?

I want to know when the unity3d application run,

Which functions execute first,and next and so on?For exmaple a script include:

Awake(), Start(), Update(), OnTriggerEnter(),OnMouseOver, and other MonoBehaviour’s functions

As I know,the simple sequence is:
Awake() → Start() → Update()

but I want to know the others funtions’ sequence of execution.Like
OnMouseOver() and Update(),which first?

Although I can Debug them ,but I want to know how they execute?

And what’s more:
Different Ojbects add the same component ,Which component’s functions execute first?
According to What?



I guess you’ve already read those? Because you can get that information any clearer. You can test it yourself by putting a Debug.Log with a timestamp into each function if you want.

GameObjects are processed in the order they are stored inside the engine. You can’t change the order from outside.

The only events that can be ordered are OnGUI with GUI.depth and the rendering of cameras with Camera.depth.

If you need a special order of two scripts you can use Update and LateUpdate to make sure the Update of the other object is already done. If you have more complex event chains you should use your own messaging system.