Why MonoBehaviour.print() starts with a small letter?

Hello,

This should be a very basic issue but I’m quite curious.
In Unity, My understanding is that a name of a method starts with a capital letter, for example MonoBehaviour.GetComponent(), MonoBehaviour.Destroy(), MonoBehaviour.ToString(), etc.

But why MonoBehaviour.print() starts with a small letter p, not being MonoBehaviour.Print() but MonoBehaviour.print()?

Thanks in advance…

Maybe it’s related to the fact that many languages have a basic “print” method to output to the console/output stream so it was likely put there to enable a short-form and familiar call i.e. printing the contents.

In the end, it’s just a call to “Debug.Log()”

Originally Unity supported C#, Javascript and Boo too.

The 100% actual reason; not sure. :slight_smile:

…and then there Unity.Mathematics.math

Well that’s also a compatibility thing I guess. The math library aims at compatibility with HLSL. The “print” method (which is just a less powerful wrapper of Debug.Log and depends on a MonoBehaviour instance) was most likely just added for the other languages back then. Specifically Boo which was / is a .NET language with a python-like syntax.

The reason why they made the mathematics library lower case is explained here:

It makes sense.
Thank you very much!