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.
Signature
Section titled “Signature”sco_result (*)(sco_plugin *, const char *, uint64_t, const double *, const double *, uint64_t *)Service and availability
Section titled “Service and availability”| 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 |
Parameters and buffers
Section titled “Parameters and buffers”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.
Results and failures
Section titled “Results and failures”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 capability
Section titled “Absent capability”Absent service: query_service NOT_FOUND; present disabled operation: UNAVAILABLE.
Ownership
Section titled “Ownership”Live caller owns result through existing game.entities ledger. Inputs copied for synchronous provider call, host-session table borrowed; no cross-boundary allocation.
Thread affinity
Section titled “Thread affinity”Game thread only; WRONG_THREAD otherwise.
Callback context
Section titled “Callback context”No plugin callbacks. Host-only provider callbacks synchronous, bounded and nonthrowing.
Reentrancy
Section titled “Reentrancy”No recursive reentry; host adapter must not call plugins.
Cleanup and cancellation
Section titled “Cleanup and cancellation”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.
Language mappings
Section titled “Language mappings”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.hpptable_->spawn( |
| csharp | unsupported | docs/design/prefabs.mdC# and sandboxed Lua: unsupported |
| lua | unsupported | docs/design/prefabs.mdC# and sandboxed Lua: unsupported |
Examples
Section titled “Examples”None identified in the catalogue; this is not proof none can exist.
ABI pins prove layout, not semantic behavior or a live game session.