Skip to main content

Assets

Assets are the images, audio files, and other media that you use in your story. In order for the game to use these assets, you need to import them into the Unity Project inside the assets folder in Assets/_Main/Story/Content/[your_story]/assets.

Supported asset types include:

  • Images: .png, .jpg
  • Audio: .mp3, .wav, .ogg

Importing Assets into Unity

  1. In Unity's Project panel, navigate to Assets/_Main/Story/Content/[your_story]/assets.
  2. Drag and drop your files from your computer's file explorer directly into this folder in the Unity Project panel.
  3. Unity will automatically import the files. Wait for the import process to complete (a progress bar may appear at the bottom of the editor).
tip

You can also right-click inside the folder in the Project panel and select Show in Explorer (Windows) or Reveal in Finder (Mac) to open the folder directly, then copy your files there. Switch back to Unity and it will detect the new files automatically.

Referencing Assets in Yarn Scripts

Once imported, assets are referenced in Yarn commands using their file name without the extension (all lowercase).

For example, if you import an image named bedroom.png, you reference it in your Yarn script as:

<<set_background "bedroom">>

Similarly, a character sprite named alice_happy.png is referenced as the happy emotion for the character alice:

<<set_char "Alice" "emotion:happy;pos:left;face:right">>
info

Asset names are case-insensitive when used in commands, but it is best practice to keep your file names in lowercase with underscores instead of spaces (e.g., park_sunset.png, not Park Sunset.png).