PrefabStore

interface PrefabStore

Storage/hosting for prefabs.

Design note

We know "prefabs exist" as a concept, but we do not know:

  • whether the host stores them on disk, in memory, or streams them

  • whether they are world-scoped, server-scoped, or per-player

This contract stays minimal and uses opaque Prefab data.

Functions

Link copied to clipboard
abstract fun delete(id: Key)

Deletes a prefab if present.

Link copied to clipboard
abstract fun list(): List<Key>

Returns known prefab ids.

Link copied to clipboard
abstract fun load(id: Key): Prefab?

Loads a prefab by id, or null if missing.

Link copied to clipboard
abstract fun save(prefab: Prefab)

Saves or overwrites a prefab.