Asset Preview
The Inspector and Asset Browser show a visual preview for supported asset types instead of just a name and a generic icon: textures show a miniature of the image, models render a shaded thumbnail, materials render onto a sphere (or cube), and audio clips show a waveform.
Where previews show up
- Asset Browser — every tile shows its thumbnail instead of the type icon, once one can be generated. A S / M / L control in the header adjusts tile size.
- Inspector — selecting a texture, model, or audio asset shows a larger static preview at the top of the panel.
- Material Inspector — gets its own interactive preview instead of a static thumbnail (see below).
Thumbnails are generated once and cached (in memory, and on disk under
.cache/thumbnails/ in your project), keyed to the asset's content — editing
and saving an asset regenerates its thumbnail automatically; nothing needs to
be refreshed by hand.
Material preview: swap mesh, orbit the camera
Selecting a .material asset shows a live preview panel above its parameter
list:
- Sphere / Cube buttons swap the preview mesh.
- Left-click drag orbits the camera around the mesh.
- Scroll wheel zooms in and out.
Unlike the static thumbnails elsewhere, this preview reflects your edits immediately — including changes you haven't saved yet — so you can tune a material's parameters and see the result in real time before committing.
Expanding compound assets (models → materials & textures)
A model (.gltf / .glb) can bring its own materials and textures along when
imported. Those generated sub-assets aren't listed in the Inspector —
instead, model tiles in the Asset Browser show an expand toggle (a small ▸
arrow). Clicking it reveals the model's generated materials and textures as their
own tiles right in the browser, Unity-style; clicking one selects it like any
other asset, so you can preview and edit it (e.g. tweak a generated material's
colour). Clicking the model tile itself just selects the model — only the ▸
toggle expands it.
Audio previews
Waveform previews currently support PCM .wav files. Other formats
(.ogg, .mp3, …) don't have a decoder in the engine yet and show the
generic audio icon instead.
Extending: custom previewers
Preview generation is a registry keyed by asset type
(studio/PreviewSystem.registerProvider), the same pattern the Gizmos system
uses for custom component gizmos. A project can register its own generator for
an asset type — including overriding a built-in one — at studio startup, after
PreviewSystem.init(). This is a Zig-source extension point today; a runtime
editor-plugin loader (a separate, planned piece of work) will register through
the same call once it exists.