Unity By Example - Page 3

Unity Attributes That Make the Inspector Easier To Use

Attributes are markers that can be placed above a class, property or function in a script to indicate special behaviour. RequireComponent The RequireComponent attribute automatically adds required components as dependencies. When you add a script which uses RequireComponent to a GameObject, the required component is automatically added to the GameObject. This is useful to avoid ... Read More