# Tutorial: assets in Play (soft refs and hot reload)

Content refs fail softly; the editor can hot-reload Shinra output. Play mode **defers** applying asset reloads until Stop (or when Edit allows).

Deep reference: [Assets and Shinra — soft refs](/docs/systems/assets-and-shinra.md#soft-refs-and-loadhot-reload-recovery), [UI and editor](/docs/systems/ui-and-editor.md#editor-state-and-events).

## Soft refs (always)

| Failure | Result |
|---|---|
| Mesh pending / missing | Hidden pending or error cube |
| Material / shader fail | Pink error material |
| Unknown archetype | `_missing` host |
| Skybox cubemap fail | Solid skybox color |

Scenes keep loading. Inspector **Asset issues** banners list path + status for broken actors.

## Hot reload while authoring

1. Edit mode: change a texture/material source, let Shinra watch rebuild.
2. Engine applies at a frame boundary — viewport updates without a full restart.
3. Enter **Play**: further asset events queue; they do not swap mid-simulation.
4. **Stop** (or return to Edit): deferred reloads apply.

Do not expect Play to pick up a material fix until you leave Play.

## Practical loop

1. Author mesh/material paths with `asset://./...`.
2. If you see pink/error cube — fix the asset or path, stay in Edit until it resolves.
3. Play to validate gameplay; Stop before iterating on shaders/textures again.

Leak-check smoke after hot reload + Play→Stop: `bin/kaji/kaji editor --workspace=$PWD --project=$PWD/../hikari-games/example --type=dynamic --config=debug --memory-leak-check --run` ([Build and packaging](/docs/guides/build-and-packaging.md)).

## Next

- [First mesh and material](/docs/tutorials/first-mesh-material.md)
- [Dynamic editor recompile](/docs/tutorials/dynamic-recompile.md)
