# AssetImport

> Talos next · Since 0.6; changed in 0.7

## Fields

| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
| `source` | `string` | yes |  |  | The file this asset was imported from: a project-relative path, or just a file name when the file was copied in beside the scene. A record of where it came from, not a path the runtime loads — `AssetRef.path` is that. |
| `sourceSha256` | `string` | yes |  |  | SHA-256 of the source file's bytes at import, lower-case hex. A reimport that changes this is what makes a running world drop its cached mesh, because the hot-reload diff compares AssetRef values and not file contents. |
| `unitScale` | `number` | yes |  |  | Multiply the file's units by this to get metres. 1 for a file already in metres, 0.01 for centimetres, 0.0254 for inches. Must be finite and between 1e-6 and 1e6, which is the range the runtime's single-precision transform can hold; the `asset-import-invalid` rule rejects anything else. |
| `upAxis` | `Axis` | yes |  | `Y`, `Z`, `-Y`, `-Z`, `X`, `-X` | Which axis of the FILE points up. The engine is Y-up, so "Y" is a no-op. |
| `forwardAxis` | `Axis` | no |  | `Y`, `Z`, `-Y`, `-Z`, `X`, `-X` | Which axis of the FILE points depth-forward, so the file's basis can be turned onto the engine's. The target is glTF's own front, +Z, so "Z" is a no-op. Omitted means "Z", except when upAxis is "Z" or "-Z" — +Z cannot be both up and forward — where it means "-Y" and "Y" respectively, which is the Z-up convention every Z-up authoring tool exports. It must not name the same axis as upAxis. It does NOT put the model's nose on the entity's forward: the entity's forward is -Z and this lands on +Z. `AssetRef.forward` is the field that does that. |
| `targetSizeM` | `number` | no |  |  | When set, the longest measured side of `AssetRef.bounds` is scaled to this many metres, after unitScale. Must be finite and between 1e-6 and 1e6, the same range as unitScale. Without `bounds` there is nothing to measure and it is ignored. |
| `baseCenter` | `boolean` | no | `false` |  | When true the origin moves to the base centre of the measured bounds: min.y to 0, x and z centred. Defaults to false. Base-centred is what lets an entity at y = 0 stand on the floor instead of sinking half-way into it. |
| `collider` | `ImportCollider` | no |  | `none`, `box`, `trimesh`, `hulls` | What the importer chose to build for collision. Informational: the collider that actually runs is the entity's `collider` component. Recorded so a reimport can offer the same choice, and so nothing safety-critical is inferred silently. |
| `scan` | `ScanSettings` | no |  |  | Present when the file was cooked as a scan: `source` and `sourceSha256` then describe the scan file the person picked, and `AssetRef.path` the GLB the cook made from it. |
| `bodyRig` | `integer` | no |  |  | Present when the editor gave this model, which had no skeleton, its simple body rig: five joints up its middle (body_root, body_hips, body_spine, body_chest, body_head), the mesh skinned to them by height, and generated body clips (Idle, LeanLeft, LeanRight, Punch, Throw, ThrowBack, PointLeft, PointRight, Cheer). The number is the generator's version. `source` and `sourceSha256` then describe the file the person picked, and `AssetRef.path` the rigged GLB the editor wrote from it. Absent: the file was copied as it is. |

## See also

- `Axis`
- `ImportCollider`
- `ScanSettings`
