Manual

Game Objects and Components

This guide focuses on one thing: building objects with useful components.

The Core Model

In Sendama, gameplay objects are usually GameObject instances.

A game object typically includes:

  • a Transform (position, rotation, scale)
  • a Renderer (visuals)
  • optional extra components (behavior, colliders, custom systems)

Create A Useful Object In The Editor

  1. open Hierarchy
  2. press Shift+A
  3. create GameObject
  4. rename it (example: Player)
  5. edit values in Inspector

Minimum Component Setup

For a visible object, set at least:

  • transform position
  • renderer texture path
  • renderer crop values when needed

For interactive objects, also add:

  • behavior script component
  • collider-related components where appropriate

Example: Player Object Metadata

[
  'name' => 'Player',
  'type' => 'GameObject',
  'transform' => [
    'position' => ['x' => 8, 'y' => 20],
    'rotation' => ['x' => 0, 'y' => 0],
    'scale' => ['x' => 1, 'y' => 1],
  ],
  'renderer' => [
    'texture' => 'Textures/player.texture',
  ],
  'components' => [
    [
      'type' => Sendama\MyGame\Scripts\PlayerController::class,
      'data' => [
        'speed' => 4.0,
      ],
    ],
  ],
]

Parent-Child Objects

Use hierarchy parenting for related pieces:

  • Player as parent
  • Weapon as child

This keeps relative movement and organization clean.

In Hierarchy, drag one object onto another to parent it.

Good Naming Patterns

Use intent-based names:

  • Player
  • EnemySpawner
  • ExitDoor
  • ScoreLabel

Avoid placeholder names like Object1.

Checkpoint

Before moving on, confirm:

  • your object is visible in scene view
  • component values appear in inspector
  • scene saves and reloads without losing object data

Related Guides