Supported sources and importer settings.
Importers
An importer turns a source file (a PNG, a glTF model, a WAV) into a typed game asset with a stable asset:// ID. Importing is how every file gets into a DemiEngine project; cooking later turns those assets into platform-ready data.
What importing does
Importing copies or references a source, writes a small *.asset.json manifest next to it, and records a content hash and dependencies. The manifest is the asset's identity — scenes and scripts reference the asset:// ID, never the file path. When you edit the source, you reimport and the ID stays the same.
demi asset import assets/textures/skyforge_rune.png \
--id asset://textures/skyforge_rune
demi asset import <source> takes the source file path and --id for the stable asset:// identity. It writes a manifest and records the import. If two importers can claim the same file, add --importer <id> to choose.
Supported sources
Each importer has an ID (written to the manifest's importer field, or passed via --importer when two importers can claim the same extension):
| Importer ID | Extensions | Asset types |
|---|---|---|
image | PNG, JPEG, BMP, TGA, QOI | Texture2D and friends |
svg | .svg | Icon2D, SvgTexture2D |
gif | .gif | GifAnimation2D |
audio | WAV, OGG, MP3, FLAC | AudioClip |
font | .ttf, .otf | Font2D, FontAtlas2D |
gltf-model | .gltf, .glb | Model3D |
model | .obj, .iqm, .m3d | Model3D |
| Video | MP4, WebM, MOV | VideoClip |
| Data | JSON | DataAsset |
text | .txt, .yaml, .yml | Text |
SVG and GIF are separate importers, not flavors of the generic image path: an SVG becomes a vector-sourced Icon2D or SvgTexture2D, and an animated GIF becomes a GifAnimation2D. Each importer's settings live in the manifest (texture filtering, audio streaming, font variations — see Asset groups & streaming for how they load). The importer ID and version become part of the cook key, so an importer upgrade produces fresh cooked output.
Working with manifests
demi asset reimport assets/textures/skyforge_rune.asset.json
demi asset register-generated assets/generated/skyforge_atlas.png
demi asset inspect asset://textures/skyforge_rune
demi asset deps asset://textures/skyforge_rune
| Command | What it does |
|---|---|
asset reimport <manifest> | Re-runs the import for a changed source: new source_hash, refreshed dependencies and output |
asset register-generated <source> | Registers a file produced by another tool under assets/ so it has a manifest |
asset inspect <id> | Prints the manifest, hash, and dependency summary for an asset:// ID |
asset deps <id> | Lists what the asset depends on (textures a model uses, and so on) |
asset collider <…> | Derives collision shape data from a model source |
asset budget | Reports size and budget figures for project assets |
Run reimport after every source edit. Forgetting it leaves the old hash in place and the cook step will not see the change.
Carrying assets between projects
Assets move as a deterministic container with checksums, so both sides can verify nothing changed in transit.
demi asset export-package games/skyforge/packs/skyforge_runes.demipack
demi asset import-package packs/skyforge_runes.demipack
asset export-package <out.demipack>— writes a.demipackcontainer: the selected assets plus checksums, in a stable order so two exports of the same content match.asset import-package <in.demipack>— brings the contents into a project and verifies the checksums.
A .demipack is not a full game package — it carries assets, not built games. For installable packages see Installing packages.
Next steps
- Asset groups & streaming — loading imported assets under a memory budget.
- Cooking — turning imported assets into platform output.
- Data schemas — declaring the shape of JSON data assets.