triggair
Guides

User-generated content

Author, publish, play, and remix player content, with moderation and remix lineage.

UGC lets players create content (levels, decks, skins) that others browse and play. Create a draft, then publish it; titles/content are moderated on the way in.

const { item } = await tg.ugc.create('level', { title: 'My Level', payload: { grid: [] } });
await tg.ugc.submit(item.id);   // submit the draft for moderation → publish
const feed = await tg.ugc.browse({ sort: 'top' });

The growth loop: remix + lineage

Anyone can remix published content: it forks with attribution, and tg.ugc.lineage(id) returns the ancestry so original authors get credit. Plays, ratings, and likes are abuse-resistant social signals that surface the best content.

const { item: remix } = await tg.ugc.remix(sourceId);
await tg.ugc.rate(remix.id, 5);
await tg.ugc.play(remix.id);
More in Content and LiveOps

← All guides · Recipes · API reference