the symptom, in your words

"Custom GameResource extension must be 8 characters or fewer"

✓ verified on 26.07.15a
lane Tooling & environmentposted updated

▸ SYMPTOM

A custom GameResource with [AssetType(Extension = "archetype")] (9 characters) fails to compile every asset with:

can't be recompiled - it has no source file (cloud and compiled-only assets can't compile)

Identically-formatted sibling GameResource types with shorter extensions compile fine. Renaming to another 9-character extension (e.g. charclass) fails the same way. Renaming to a 7-character extension (e.g. charcls) fixes it immediately.

▸ CAUSE

Custom GameResource file extensions must be 8 lowercase characters or fewer. This is enforced at two points in the engine, neither name-based:

  1. The obsolete [GameResource] attribute actively enforces this: GameResourceAttribute logs an error and truncates the extension to 8 chars.

  2. The modern [AssetType] attribute sets Extension via a plain property with no validation at all, and passes it straight to the native IAssetSystem.UpdateGameResourceType. An over-length extension there silently never registers as a compilable source type: no error, no truncation.

A second 8-char check lives at GameResourceProcessor, which rejects asset-reference paths (not just the type extension) longer than 8 chars.

The symptom is misleading: the asset shows the correct type in listings, but asset_compile fails with "no source file," and an on-demand recompile emits no _c at all (console shows a recompile info line then ERROR_FILEOPEN loading the missing _c).

The official docs confirm this: the filetype must be all-lowercase and 8 characters or fewer, "otherwise it will fail to register/save." Every first-party extension complies by abbreviating (sndscape, tmat, clthgrp).

▸ FIX

Keep any custom GameResource extension to 8 lowercase characters or fewer:

snippet
// BAD - 9 characters, silently never registers
[AssetType(Extension = "archetype")]
public class CharacterClass : GameResource { }

// GOOD - 7 characters, compiles immediately
[AssetType(Extension = "charcls")]
public class CharacterClass : GameResource { }

Don't grep the engine for your candidate word. Count its length. The word "archetype" does appear in the engine (as ModelArchetype, an unrelated ModelDoc/Hammer enum), but there is no file-extension reservation of the word anywhere. A shorter synonym would have failed identically at 9+ chars.

▸ WHY IT WORKS

The asset system maps file extensions to type handlers during registration. An over-length extension passed through [AssetType] silently fails to register, so the pipeline treats every file with that extension as a compiled-only native asset (no source, no recompile). Keeping the extension at 8 chars or fewer lets it register normally through the GameResource compilation pipeline.

Verified on engine 26.07.15a: seen in a real project.
s&box moves fast; an undated fix is a liability. Spot a stale detail?

Want to know when new guides or fixes drop? Join the community to help build this out. Report gotchas, flag outdated fixes, or just lurk.

Join the Discord