Source File
Introduction
The Source File property determines the file that is used by the Sprite. Sprite Source Files support the following formats:
.png files
.jpg and .jpeg files
.bmp files
.gif files (animated GIFs show only their first frame)
.achx and .achj files (AnimationChains)
Images from URLs
Gum rejects any other extension, including .tga. To use one of those images, save it in one of the supported formats first. Each runtime loads its own subset of these files; see Supported Files for what each runtime loads.

If a Sprite has an empty Source File or if it references a missing file, then the missing file texture is displayed.

Setting a PNG Source File
Source File can be set by typing a value or using the ... button to browser for a file.
All files are added as paths relative to the .gumj project.

If a file is referenced outside of the .gumj folder, then Gum asks if you would like to copy the file or reference it outside of the current directory. Usually files should be copied to the project folder to keep the entire Gum project portable.

ACHX Files
Gum natively supports referencing Animation Chain XML files (.achx), which you create with the AnimationEditor. Download the latest AnimationEditor from that page.
Once you have created an .achx file, you can reference it the same as a .png by entering its name or selecting it with the ... button.

When referencing an .achx file, be sure to also check the Animate checkbox and to select the Current Chain Name.
Per-Frame Offsets and Sprite Origin
Frames in an .achx can carry per-frame RelativeX / RelativeY offsets, typically authored in the AnimationEditor to keep visual content (e.g. the bottom of a collapsing object) anchored as the source rectangle changes size from frame to frame.
The AnimationEditor authors these offsets against a center-anchored Sprite. When a Sprite in Gum plays back an .achx with non-zero offsets, set both XOrigin and YOrigin to Center so the offsets compensate as intended.
Referencing URLs
Gum Sprites can also reference URLs. Gum can display images from URLs with standard file extensions such as .png and .jpg

Sprites can also reference images without extensions, such as urls from https://picsum.photos/

Last updated
Was this helpful?

