How are script callbacks called from animation event if they are not 'public'?

Sometimes I forget to make functions in scripts public so they can be accessed from other scripts. Whilst fixing one such error it occurred to me that Unity 'animation Event' callback functions in c# don't need to be marked as public.

So out of interest anyone know or care to explain how that works?

It uses reflection (which lets you do runtime invoking of your functions by string)

You can pretty much access anything with reflection, unless you add attributes which disallow it

Note: it's the exact same way SendMessage works (which also lets you do the same with private functions)