Why: the goal or problem

Players collect keys in a museum maze. Each pickup should score once; the team wants reusable behavior attached to game objects rather than copying key logic.

How: work toward a solution

The schematic contains a player, floor, camera, and one key. Move to item triggers authored contact logic: score changes from zero to one and the item disappears. Repeat contact cannot score again. Disable contact before moving to demonstrate a missed collection: score stays zero. Reset or reload restores the player and item. This is a concept simulation.

Explore a museum maze scene

Concept simulation

Unity

In a museum maze, move the player into the key. Authored contact logic awards one point and removes it.

PIC
P: Player · I: Key · C: Camera · ─: Floor

Score: 0 · Key: Present

Initial scene: four GameObjects

Player · Floor · Camera · Key

Transform
Renderer: visual
Collider: contact
Script: award once
Execution boundary
Model: GameObject components provide appearance, collision and pickup behavior.
State and responsibility
Score and key state last only in this page. Real lifecycle, physics and exports require Unity testing.

A fictional demo within this article. Reset or reload restores its initial state.

What: the concept

Unity GameObjects contain components. Transform, rendering, collision, and authored scripts provide distinct responsibilities; an object name alone does not implement gameplay.

Keep score ownership clear and test component references.

Source