Skip to content

sc_prefabs_v1.spawn

Canonical ObjectContainers content-relative .socpak path (511 bytes max), finite zone-local pose and normalized quaternion. Caller-owned final entity ID, zero on failure; success means spawn initiation only. Shared 1024 owned quota and 128 own entities maximum, checked before mutation. Pending prefab ownership is never pruned by alive=0. Capability game.entities.prefabs is enabled by default for R1 by owner approval; Windows/SEH/streamed cleanup NOT VERIFIED.

sco_result (*)(sco_plugin *, const char *, uint64_t, const double *, const double *, uint64_t *)

Service index

Property Value
Symbol sc_prefabs_v1.spawn
Record ID sc-prefabs-v1-spawn
Service game.prefabs
Table sc_prefabs_v1
Version macro SC_PREFABS_VERSION_1_0
Packed table version 65536
Since / availability size >= 16; 1.0
Complete member extent (x64 bytes) 16
Table size (x64 bytes) 16

Header source

sco_result (*spawn)(sco_plugin* self, const char* content_path, uint64_t zone_id, const double pos[3], const double rot_xyzw[4], uint64_t* out_id);
Canonical ObjectContainers content-relative .socpak path (511 bytes max), finite zone-local pose and normalized quaternion. Caller-owned final entity ID, zero on failure; success means spawn initiation only. Shared 1024 owned quota and 128 own entities maximum, checked before mutation. Pending prefab ownership is never pruned by alive=0. Capability game.entities.prefabs is enabled by default for R1 by owner approval; Windows/SEH/streamed cleanup NOT VERIFIED.

BAD_ARG invalid handle/path/pose/output; WRONG_THREAD; TOO_MANY quota; NOT_FOUND zone/content/class; UNAVAILABLE disabled capability or cleanup; FAILED provider refusal/fault. Output ID zero on failure.

Absent service: query_service NOT_FOUND; present disabled operation: UNAVAILABLE.

Live caller owns result through existing game.entities ledger. Inputs copied for synchronous provider call, host-session table borrowed; no cross-boundary allocation.

Game thread only; WRONG_THREAD otherwise.

No plugin callbacks. Host-only provider callbacks synchronous, bounded and nonthrowing.

No recursive reentry; host adapter must not call plugins.

Use existing entities despawn/set_transform and game.owned retention/removal. Ordinary owner unload removes pending/streamed owned prefab via delayed removal primitive; no materialization/removal completion promise. Known ID on provider failure remains tracked for cleanup. Fault-retained native provider follows restart-required lifetime contract.

Status labels are copied verbatim from the catalogue: direct is native access; typed-wrapper is wrapper-backed; restricted is a subset/adaptation; unsupported means no supported route is established. No status implies universal safety.

Language Catalogue status Source evidence / wrapper tokens
c direct include/sc_prefabs.h
(*spawn)
cpp typed-wrapper include/scosdk/game/prefabs.hpp
table_->spawn(
csharp unsupported docs/design/prefabs.md
C# and sandboxed Lua: unsupported
lua unsupported docs/design/prefabs.md
C# and sandboxed Lua: unsupported

None identified in the catalogue; this is not proof none can exist.

ABI pins prove layout, not semantic behavior or a live game session.