Skip to main content

How are methods like Awake, Start, and Update called?

I'm developing with Unity 5 and I know that there are some methods you can use like in the code below:

public class MyGameElement : MonoBehaviour 
{
    private void Awake() { }
    private void Start() { }
    private void Update() { }
    private void FixedUpdate() { }
    // and more
}

I know what they do but I find it strange that the methods can be private. However they are not called into my code I've written. Here you've an image with code lens (I use VS 2015 Professional for coding) where you can really see that it has zero references.

0 references: private void awake / 0 references private void FixedUpdate

The second 'strange' thing for me is that the methods aren't overwritten.

So my question is now is there anything that Unity has implemented into the MonoBehaviour class that the methods can call?

H. Pauwelyn
  • 805
  • 5
  • 17
  • 31