What do <> and [] mean when I see them in Unity?

Hi,

That’s right. In C#, we use [] for arrays and to access elements in arrays, List objects, dictionaries and other collections. And we use <> for generics like, for example, List<T>. In the context of Unity, common generics are GetComponent<T> and FindObjectOfType<T>.


See also:

1 Like