🧰How to use asset compiler
The Asset Compiler turns your source files under assets/ into smaller baked files the player actually loads. Your scenes, prefabs, and TypeScript keep pointing at the original names (foo.png, bar.glb). The engine remaps those logical @project/... paths to the baked copies at runtime.
That is why you still write @project/assets/textures/foo.png in code after compression. See Project code fundamentals.
What it is doing
Source files stay in assets/. The compiler writes baked output into .dist/ (build output — gitignored, restored by compiling). A manifest at .dist/.genesys/baked-assets.json maps each logical source path to its baked target.
The engine documents those remaps as, for example, PNG → KTX2 (GPU texture container) and WAV → OGG. Only @project/ paths are remapped. @engine/ assets pass through unchanged.
The runtime can load KTX2 textures and GLB meshes that use Draco or Meshopt. You do not change those loaders; they are already in the engine.
Smaller files in .dist/
Play, upload, and browser download send full-resolution PNG/WAV/GLB
GPU-friendly textures
The GPU would expand huge PNG/JPEG in memory
Scenes keep working
You would otherwise retarget every material and loadTexture call after each compress
Compile on Play runs this pass before Play mode starts. First play after a big import is slower; later plays skip work that is already baked. Processing time follows how many assets changed and how large they are.
Settings live in Project Settings in the editor. They are stored on disk in <Name>.genesys-project under assetCompiler. Prefer the editor. Do not treat that JSON as something to hand-edit unless you know why.
Typical assetCompiler fields:
enabled
Compiler is on
compileOnPlay
Run the bake before Play
textureCompression
enabled, quality, maxSize (longest edge in pixels), and which of png / jpeg / webp to process
meshCompression
enabled and level for geometry in GLB
audioCompression
enabled, quality, and which of wav / flac / aiff / ogg / aac / m4a to process
A real project can cap textures at maxSize 1024 with quality medium — that is a setting, not a universal default. Match cap and quality to how close the player sees the surface.
Set it up in the editor
Choose the assets to compress
Enable the compression options that match the asset types used by the project.
Texture compression
Processes image textures (PNG, JPEG, WebP). Caps resolution with maxSize and writes a baked texture (engine remap example: .png → .ktx2). Use it for 2K/4K maps that do not need full source resolution in Play.
Mesh compression
Shrinks 3D geometry inside GLB files. Use it when a model is denser than its on-screen size needs.
Audio compression
Processes large or lightly compressed sources such as WAV (engine remap example: .wav → .ogg). Skip already-small files if quality is already at the floor you want.
What You've Done
The project compiles selected assets when entering Play (if Compile on Play is on) and remaps @project/ loads to the baked files in .dist/. Source files in assets/ stay the originals. Continue testing as assets change so size and quality stay appropriate. Import path: Assets & asset generation.
Last updated
Was this helpful?

