Skip to main content

Workflow: Components

Every GameObject has a Transform. Add only the Components that own required data or behavior; a smaller component set is easier to validate and consumes less serialized and runtime state.

Add and Remove Components

Select a GameObject and use Add Component in the Inspector. Search and category groups use the same display names shown in the component header. Right-click a component header to remove it. Removal clears that component's authored data, so use Undo immediately if it was accidental.

Component Groups

GroupComponents
RenderingMesh Renderer, Camera, Directional Light
PhysicsCollider, Character Controller
Scripting and mediaLua Behaviour, Audio Source, Particle System
AnimationTransform Animator, Animator, Player Animator
Native playerPlayer Input, Player Motor, First Person Controller, Third Person Controller, Camera Rig, Camera Zone
InteractionInteraction Ray, Interactable, Spawn Point
World authoringRoom, Portal, NavMesh Surface, Navigation Modifier, NavMesh Agent

World-authoring components are configured through View > Advanced Scene Authoring. UI elements belong to UI Canvases and are not GameObject Components.

Common Compositions

GoalTypical Components
Static wall or floorMesh Renderer, Collider
Trigger pickupMesh Renderer, trigger Collider, Lua Behaviour, optional Audio Source
Interactive terminalMesh Renderer, Collider, Interactable, Lua Behaviour, optional Audio Source
First-person playerCharacter Controller, Player Input, Player Motor, First Person Controller, Camera Rig, Interaction Ray, Spawn Point
Third-person skinned playerCharacter Controller, Player Input, Player Motor, Third Person Controller, Camera Rig, Mesh Renderer, Animator, optional Player Animator
Transform-animated doorMesh Renderer, Collider, Transform Animator, Lua Behaviour; optional Portal
Ambient effectParticle System or looping Audio Source
Runtime path followerRoot GameObject with NavMesh Agent; separate root with NavMesh Surface

These are starting points, not required genre templates. A project can implement inventory, interactions, AI state, menus, and progression in Lua by composing the public APIs rather than depending on a game-specific engine module.

References and Validation

Assign imported assets through GUID-backed Inspector fields. Use exposed Lua properties for scene references, and use the object picker rather than copying IDs when one is available. After changing Components:

  1. run Validate Project;
  2. resolve missing companion Components and references;
  3. inspect Show PS1 Budget for new persistent memory and count use;
  4. test Play Mode, then the packaged CUE.

See Components for properties and runtime behavior, Lua Scripting for the scripting contract, and Advanced Scene Authoring for world systems.