Component
Related terms: composition, game object, object lifecycle, ECS
A reusable part attached to a game object: a collider, an audio player, a health script or a renderer. In an object-based component design, a component can hold both state and behavior and receive lifecycle callbacks.
Build a door by combining a model, a collider and a door script. This is composition: assembling behavior from parts. In ECS, components are typically data while systems perform the work.
- Further reading
- Unity: Add components to GameObjects