How does Unity call Update() etc without override or reflection?

While learning about Unity, I have some issues with how Unity works with C#. In the daytime, I’m a usual software developer, so I’m trying to really understand what Unity is doing in the backend. I’m scratching my head to understand how Unity deals with calling a custom defined Update, even though we aren’t overriding it, and I read somewhere Unity doesn’t use reflection (for which I’m glad, since this would slow things down).

My guess: is it because Unity doesn’t actually compile the C# as is, but does some pre-processing allowing to apply some custom magic to specific cases like Update functions it discovers etc? Since mono is involved, everything is eventually compiled to IL and ran inside a CLR/Mono environment, or isn’t this the case at all?

Thanks for clearing things up a bit. I know I probably shouldn’t be concerned with all this, but if there’s a simple explanation I’d be glad to hear it.

Does this answer your question? How does Unity's built in event system work behind the scenes, as opposed to C# events? - Unity Answers

So long story short, reflection IS being used and there’s no magic at all :frowning:
Thanks!