Skip to main content

Importing assets

Copying a file into the project's assets folder is all it takes to import it. The editor notices the file, gives it a .meta file with a guid and default import settings, and from then on you can use it anywhere. This page explains the ways to add files, the file types Talesmith understands, .meta files, the asset inspector where you change import settings, and how changed files reload while you work.

Add files​

Any of these works:

  • Drop files from your file manager onto the Assets panel, or onto a folder in it. The panel shows Drop to import into and the folder's name.
  • Click the import button in the Assets panel's toolbar, or choose Assets › Import files…, and pick files. They are copied into the folder the panel shows.
  • Copy files into the assets folder with your file manager or another program. The editor picks them up within a moment.

Imported files keep their names; when a name is taken in that folder, the copy gets a number, as name 1.png. Folders can be imported whole. When the import finishes, the panel opens the folder and selects the new assets.

Supported files​

KindExtensionsUsed for
Texture.png, .jpg, .jpeg, .webp, .bmp, .gif, .icoSprites, tilesets, cookies, particle textures. See Sprites.
Sprite atlas.tatlasMany sprites packed into one texture. See Sprite atlases.
Audio.wav, .oggSound effects and music. See Audio.
Font.ttf, .otf, .ttcText. See Fonts.
Tile map.hexyMaps from Talesmith or Hexy. See Maps and grids.
Scene.tsceneSee Scenes.
Prefab.tprefabSee Prefabs.
Particle preset.tparticlesSee Particles.
Material.tmaterialSee Materials and shaders.
Shader.tshader, .sksl, .spv
Localization table.tlocSee Localization.
Script.csC# scripts. See Scripting.
Plugin manifest.tplugin

Other files are listed as File. They are kept and can ship with the game, and scripts can read them, but the editor does nothing special with them.

.meta files​

Every file and folder in assets gets a .meta file next to it, named after it, such as hero.png.meta. It holds:

  • The asset's guid, a unique id. Scenes, prefabs, maps and materials refer to assets by guid, so you can rename and move assets without breaking anything that uses them.
  • The asset's import settings, such as a texture's filtering and sprites.
  • Its labels.

The editor creates, moves and renames .meta files along with their assets. A few rules keep them working:

  • Commit them to version control with their assets. Without its .meta file, an asset gets a new guid on another machine, and everything that referred to it breaks.
  • Do not edit them by hand. Change settings in the asset inspector.
  • Move them with their assets when you work outside the editor. If you forget, the editor still pairs a moved file with its .meta when the file's contents did not change. Asset health lists .meta files that lost their asset.
  • When you copy a file together with its .meta file, both copies claim the same guid. The editor keeps the guid for the file it knew first and gives the copy a new one, and reports the repair.

Files and folders whose names start with a dot or end in ~, the bin and obj folders of the scripts, and the plugins folder with everything in it are not assets: they do not appear in the Assets panel and get no .meta files. See Meta files for the format.

The asset inspector​

Select an asset in the Assets panel to see it in the Inspector panel.

A texture: its preview with the sprites outlined, then its import settings.

Every asset shows:

SectionWhat it shows
HeaderThe asset's thumbnail, name, kind and path, with an Open button for assets that open, such as scenes and scripts
LabelsTags for searching (tag:music) and for including assets in builds. Type a label and press Enter; click × on a label to remove it.
DetailsThe guid, file size, modification time and importer
UsesThe assets this one refers to, such as a scene's textures and prefabs
Used byThe assets that refer to this one. Check it before you delete something.

Click an entry under Uses or Used by to go to that asset. A reference to an asset that no longer exists is marked missing.

Import settings​

Textures, sounds, fonts and sprite atlases have import settings, described on their own pages:

KindSettings
TexturesFiltering, wrapping, maximum size, compression, mipmaps, premultiplied alpha, and sprites
SoundsLoad type, mixer bus, volume and loop points
FontsFamily name, default size and fallback fonts
Sprite atlasesSources and packing

Changes to import settings are not applied until you click Apply; Revert discards them. The footer reads Unapplied changes in between. If you select another asset with unapplied changes, the editor asks whether to apply them.

Scenes and prefabs show what they contain: their number of entities and prefab instances, the root entities and how many of each component they use. Other kinds, such as maps, materials and particle presets, show only the common sections.

Changes on disk​

The editor watches the assets folder. When you save a file in another program, such as an image in your paint program or a map in Hexy:

  • The Assets panel updates its list and thumbnail.
  • If the scene uses the asset, it is imported again and the viewport shows the new version: a repainted texture appears on every sprite that uses it. Assets that depend on it are reloaded too, such as a material whose shader changed.
  • A file deleted outside the editor stays loaded until the scene is reloaded, and Asset health reports what referred to it.

Play mode loads assets when it starts, so changes made while the game runs show the next time you press Play. Scripts are the exception: they are recompiled and swapped into the running game. See Play mode.

Assets › Refresh assets scans the folder again, for the rare case that the editor missed changes, such as files changed while it was not running. Reimport in an asset's context menu imports that asset again.