Skip to main content

Assets

An asset is game content several nodes share and that is too big to inline in a scene node — an animation clip today, a prefab or a material later. This is what Godot calls a Resource.

One rule

A string is a reference, a table is a definition. Every asset-typed component property accepts either:

[nodes.animation]
library = "animations/platform.toml" # a reference — every node naming it shares one parsed asset

# or, inline:
[nodes.animation.library]
type = "animation_clip"
# ... the definition, written in place

An author writes three reference forms and no more:

FormMeaning
"animations/hero.toml"The whole file
"animations/hero.toml#run"The entry named run inside it
"#hero_idle"An [[assets]] block in the same scene document

Sharing is the default; assets.duplicate opts out with a private copy. A reference that does not resolve warns and the rest of the scene loads — one bad path does not take a whole scene down. A definition table that does not parse is an error, reported where it was written.

Plugins define asset types

Core never learns what an asset is. A plugin registers a parser with App::register_asset_type(name, parse) and downcasts the parsed object itself. Registering an asset type also buys inspector support: asset is a property type in the component schema set, so every asset type anyone registers gets a reference row in the generated inspector.

The assets script module covers load (returns the resolved definition table), duplicate, exists, reload, save, and directory.

Assets ship in packs

balaur export already bundles every .toml, so a shipped game resolves an asset exactly as a dev run does — a packed run loads a clip byte-for-byte the way development did. Binary assets (audio, textures, fonts) with content hashing are on the roadmap.