What exactly are < and >?

What are they exactly, Are they for parameters too? Why not write GetComponent(MeshRenderer)?
Will this be covered in one of the future video?

1 Like

Hi Azure,

The things with <> refer to generic methods. It’s a special syntax. C# is not a natural law but a programming languages which was invented by people. Somebody decided at some point that the syntax is supposed to look this way, and since then, it has been looking this way.

We do not cover generic methods in this course as we do not declare our own generic methods either. We just use the premade Unity methods.

Did this clear it up for you?


See also:

Yes I get it now, thank you

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms