<!-- GENERATED FILE: do not edit by hand. --> <!-- Regenerate with npm run gen-docs. -->
Sources: packages/script-sdk/src/index.ts.
Script SDK Surface
This generated snapshot documents the current TypeScript script SDK shape. ScriptContext is the canonical aggregate available to scripts; host interfaces below are the supported namespace surfaces exposed through ctx.*.
Project-defined components are production-grade backend-validated project-local data contracts, not canonical engine atomics. Static ECS payload typing comes from built-in component contracts exposed through BuiltInComponentPayload, BuiltInComponentPatch, EngineComponentCatalog, and ctx.entity.*Component<T extends BuiltInComponentType>(...) accessors.
ScriptContext
| Context key | Declaration |
|---|---|
assets | readonly assets: AssetCatalog; |
components | readonly components: Record<string, ComponentPayload>; |
componentTypes | readonly componentTypes: EngineComponentCatalog; |
uiTypes | readonly uiTypes: UIEngineCatalog; |
room | readonly room: RoomHost; |
match | readonly match: MatchHost; |
team | readonly team: TeamHost; |
ui | readonly ui: UiHost; |
warehouse | readonly warehouse: WarehouseHost; |
audio | readonly audio: AudioHost; |
physics | readonly physics: PhysicsHost; |
navigation | readonly navigation: NavigationHost; |
terrain | readonly terrain: TerrainHost; |
water | readonly water: WaterHost; |
world | readonly world: WorldHost; |
events | readonly events: CustomEventHost; |
network | readonly network: NetworkHost; |
platform | readonly platform: PlatformHost; |
camera | readonly camera: CameraHost; |
script | readonly script: ScriptRuntimeSelf; |
entity | readonly entity: EntityAccessor; |
props | readonly props: Record<string, unknown>; |
tickedAt | readonly tickedAt: string; |
delta | readonly delta: number; |
trigger | readonly trigger: string; |
random | readonly random: RandomHost; |
debug | readonly debug: LogHost; |
info | readonly info: LogHost; |
warn | readonly warn: LogHost; |
error | readonly error: LogHost; |
log | readonly log: LogHost; |
Host Interfaces
| Interface | Members | Declarations |
|---|---|---|
AudioHost | 5 | play(assetId: string, options?: { volume?: number; pitch?: number; loop?: boolean; at?: Vector3; target?: string }): AudioHandle;<br>playSpatial(assetId: string, position: Vector3, options?: { volume?: number; pitch?: number; loop?: boolean }): AudioHandle;<br>stop(handle: AudioHandle): void;<br>setVolume(handle: AudioHandle, volume: number): void;<br>setBackgroundMusic(assetId: string, options?: { volume?: number; pitch?: number; loop?: boolean }): AudioHandle; |
AuthoringSdkHost | 9 | readonly project: ProjectAuthoringSdkHost;<br>readonly entity: EntityAuthoringHost;<br>readonly component: ComponentAuthoringHost;<br>readonly script: ScriptAuthoringHost;<br>readonly material: MaterialAuthoringHost;<br>readonly prefab: PrefabAuthoringHost;<br>readonly instance: InstanceAuthoringHost;<br>readonly world: WorldAuthoringHost;<br>readonly reference: ReferenceAuthoringHost; |
CameraHost | 4 | addLookInput(delta: Vector3): void;<br>setLookSensitivity(degreesPerUnit: number): void;<br>setPitchClamp(minDeg: number, maxDeg: number): void;<br>setViewTarget(target: string, offset?: Vector3): void; |
ComponentAuthoringHost | 5 | put(entityId: string, componentKey: string, value: Record<string, unknown>, options?: ComponentAuthoringMutationOptions): Promise<ComponentAuthoringResult>;<br>patch(entityId: string, componentKey: string, patch: Record<string, unknown>, options?: ComponentAuthoringMutationOptions): Promise<ComponentAuthoringResult>;<br>patchField(entityId: string, componentKey: string, value: unknown, options: ComponentFieldAuthoringMutationOptions): Promise<ComponentAuthoringResult>;<br>delete(entityId: string, componentKey: string, options?: ComponentAuthoringMutationOptions): Promise<ComponentAuthoringResult>;<br>setOverride(entityId: string, componentKey: string, patch: Record<string, unknown>, options?: ComponentAuthoringMutationOptions): Promise<ComponentAuthoringResult>; |
CustomEventHost | 1 | emit(eventKey: string, payload?: Record<string, unknown>, targetEntityId?: string): void; |
EntityAuthoringHost | 8 | find(name: string): Promise<ProjectEntityDto | undefined>;<br>findByTag(tag: string): Promise<ProjectEntityDto[]>;<br>findByComponent(type: string): Promise<ProjectEntityDto[]>;<br>duplicate(entityId: string, options?: EntityDuplicateOptions): Promise<ProjectEntityDto[]>;<br>setParent(entityId: string, parentId: string | null, options?: EntitySetParentOptions): Promise<ProjectEntityDto>;<br>setSiblingOrder(entityId: string, order: number, options?: AuthoringMutationOptions): Promise<ProjectEntityDto>;<br>getChildren(entityId: string): Promise<ProjectEntityDto[]>;<br>getDescendants(entityId: string): Promise<ProjectEntityDto[]>; |
InstanceAuthoringHost | 2 | getPrefab(instanceId: string): Promise<ProjectPrefabDto | undefined>;<br>getOverrides(instanceId: string): Promise<PrefabOverride[]>; |
LogHost | 5 | (message: string, metadata?: Record<string, unknown>, level?: LogLevel): void;<br>debug(message: string, metadata?: Record<string, unknown>): void;<br>info(message: string, metadata?: Record<string, unknown>): void;<br>warn(message: string, metadata?: Record<string, unknown>): void;<br>error(message: string, metadata?: Record<string, unknown>): void; |
MatchHost | 5 | getState(): Record<string, unknown>;<br>setPhase(phaseKey: string, reason?: string, metadata?: Record<string, unknown>): void;<br>addScore(subjectKey: string, amount: number, scoreboardKey?: string, reason?: string): void;<br>getScore(subjectKey: string, scoreboardKey?: string): number;<br>patchObjective(objectiveKey: string, patch: Record<string, unknown>, reason?: string): void; |
MaterialAuthoringHost | 1 | applySemanticPatch(materialIdOrKey: string, patch: MaterialSemanticPatchAuthoringRequest): Promise<MaterialSemanticPatchAuthoringResult>; |
NavigationHost | 5 | findPath(worldId: string, from: Vector3, to: Vector3, agentProfileKey?: string): NavigationPathResult;<br>nearestPoint(worldId: string, point: Vector3, agentProfileKey?: string): Vector3 | null;<br>isReachable(worldId: string, from: Vector3, to: Vector3, agentProfileKey?: string): boolean;<br>raycast(worldId: string, from: Vector3, to: Vector3, agentProfileKey?: string): NavigationRaycastResult;<br>steerToward(worldId: string, from: Vector3, to: Vector3, maxStep: number, agentProfileKey?: string): NavigationSteerResult; |
NetworkHost | 1 | sendMessage(channel: string, payload?: Record<string, unknown>, playerId?: string): void; |
PhysicsHost | 4 | occupancyQuery(worldId: string, cellKey: string): ReadonlyArray<string>;<br>shapecast(shape: PhysicsOverlapShape, transform: { position: Vector3; rotation?: Vector3 | { x: number; y: number; z: number; w: number } }, direction: Vector3, distance: number, filter?: PhysicsQueryFilter): PhysicsHit | null;<br>overlapTest(shape: PhysicsOverlapShape, transform: { position: Vector3; rotation?: Vector3 | { x: number; y: number; z: number; w: number } }, filter?: PhysicsQueryFilter): string[];<br>command(entityId: string, bodyCommand: PhysicsBodyCommand): void; |
PlatformHost | 4 | requestPointerLock(): void;<br>exitPointerLock(): void;<br>requestFullscreen(target?: "document" | "viewport"): void;<br>exitFullscreen(): void; |
PrefabAuthoringHost | 5 | create(entityId: string, options?: PrefabCreateOptions): Promise<ProjectPrefabDto>;<br>instantiate(prefabId: string, options?: PrefabInstantiateOptions): Promise<ProjectEntityDto[]>;<br>applyOverrides(instanceId: string, scope?: PrefabOverrideScope, options?: AuthoringMutationOptions): Promise<unknown>;<br>revertOverrides(instanceId: string, scope?: PrefabOverrideScope, options?: AuthoringMutationOptions): Promise<unknown>;<br>unpack(instanceId: string, options?: AuthoringMutationOptions): Promise<ProjectEntityDto[]>; |
ProjectAuthoringHost | 9 | createFolder(path: string, options?: ProjectCreateFolderOptions): Promise<ProjectResourceFolderDto>;<br>moveAsset(assetId: string, newPath: string, options?: ProjectMoveAssetOptions): Promise<unknown>;<br>findAsset(name: string): Promise<ClientProjectAssetResource | undefined>;<br>uploadAsset(file: AuthoringUploadFile, folder: string, options?: ProjectUploadAssetOptions): Promise<ClientProjectAssetResource>;<br>applySmartAssetPackage(packageKey: string, options?: SmartAssetPackageApplyOptions): Promise<SmartAssetPackageApplyReceipt>;<br>setMultiplayerBlueprint(definition: RuntimeMultiplayerBlueprintDefinitionDto, options?: AuthoringMutationOptions): Promise<unknown>;<br>createAssetPackPreviewBatch(request: AssetPackPreviewBatchRequest, options?: AuthoringMutationOptions): Promise<AssetPackPreviewBatchResult>;<br>reviewAssetPackPreviewBatch(batchId: string, request: AssetPackPreviewReviewRequest, options?: AuthoringMutationOptions): Promise<AssetPackGenerationBatch>;<br>startAssetPackFinalGeneration(batchId: string, options?: AuthoringMutationOptions): Promise<AssetPackGenerationBatch>; |
ProjectAuthoringSdkHost | 1 | applySmartAssetPackage(packageKey: string, options?: SmartAssetPackageApplyOptions): Promise<InternalSmartAssetPackageApplyReceipt>; |
RandomHost | 13 | (): number;<br>range(min: number, max: number, stream?: RandomStream): number;<br>int(min: number, max: number, stream?: RandomStream): number;<br>bool(p?: number, stream?: RandomStream): boolean;<br>sign(stream?: RandomStream): -1 | 1;<br>pick<T>(array: readonly T[], stream?: RandomStream): T | undefined;<br>weightedPick<T>(items: readonly T[], weights: readonly number[], stream?: RandomStream): T | undefined;<br>shuffle<T>(array: readonly T[], stream?: RandomStream): T[];<br>unitVector(stream?: RandomStream): Vector3;<br>pointInSphere(radius: number, stream?: RandomStream): Vector3;<br>pointInCircle(radius: number, stream?: RandomStream): Vector3;<br>gaussian(mean?: number, std?: number, stream?: RandomStream): number;<br>seeded(seed: string | number): RandomStream; |
ReferenceAuthoringHost | 5 | resolve(ref: EntityRef | PrefabRef | ComponentRef | AssetRef | WorldRef): Promise<unknown>;<br>isValid(ref: EntityRef | PrefabRef | ComponentRef | AssetRef | WorldRef): Promise<boolean>;<br>repair(entityId: string, newTarget: string, options: ReferenceRepairOptions): Promise<ProjectGraphOpDto[]>;<br>assign(entityId: string, target: string, options: ReferenceAssignmentOptions): Promise<ProjectGraphOpDto[]>;<br>clear(entityId: string, options: ReferenceAssignmentOptions): Promise<ProjectGraphOpDto[]>; |
RoomHost | 1 | getState(): Record<string, unknown>; |
ScriptAuthoringHost | 2 | applySemanticPatch(scriptIdOrKey: string, patch: ScriptSemanticPatchAuthoringRequest): Promise<ScriptSemanticPatchAuthoringResult>;<br>applyScenarioHelper(scriptIdOrKey: string, helper: ScriptScenarioAuthoringHelperId, options?: ScriptScenarioAuthoringOptions): Promise<ScriptSemanticPatchAuthoringResult>; |
ScriptFunctionHost | 0 | |
ScriptVariableHost | 4 | get<T = unknown>(variableIdOrName: string): T;<br>get<T = unknown>(scriptIdOrKey: string, variableIdOrName: string): T;<br>set<T = unknown>(variableIdOrName: string, value: T): void;<br>set<T = unknown>(scriptIdOrKey: string, variableIdOrName: string, value: T): void; |
TeamHost | 1 | getAssignment(): Record<string, unknown>; |
TerrainHost | 5 | heightAt(worldId: string, x: number, z: number): number;<br>normalAt(worldId: string, x: number, z: number): Vector3;<br>slopeAt(worldId: string, x: number, z: number): number;<br>sampleLayerWeights(worldId: string, x: number, z: number): number[];<br>raycastDown(worldId: string, x: number, z: number, fromY: number): PhysicsHit | null; |
UiHost | 4 | readonly catalog: UIEngineCatalog;<br>openPanel(panelKey: string, payload?: Record<string, unknown>): void;<br>closePanel(panelKey: string): void;<br>setWidgetValue(panelKey: string, widgetKey: string, value: unknown): void; |
WarehouseHost | 9 | get(key: string, recordKey: string): Record<string, unknown> | undefined;<br>create(key: string, recordKey: string, value: Record<string, unknown>): void;<br>update(key: string, recordKey: string, patch: Record<string, unknown>): void;<br>increment(key: string, recordKey: string, changes: Record<string, number>): void;<br>append(key: string, recordKey: string, path: string, value: unknown): void;<br>set(key: string, recordKey: string, value: Record<string, unknown>): void;<br>query(key: string, filter?: Record<string, unknown>, options?: WarehouseQueryOptions): WarehouseQueryResult;<br>query(key: string, options?: WarehouseQueryOptions): WarehouseQueryResult;<br>delete(key: string, recordKey: string): void; |
WaterHost | 2 | surfaceLevelAt(worldId: string, x: number, z: number, atTimeMs?: number): number;<br>isSubmerged(worldId: string, point: Vector3): boolean; |
WorldAuthoringHost | 4 | load(name: string, options?: AuthoringMutationOptions): Promise<ProjectWorldDto>;<br>unload(name: string, options?: AuthoringMutationOptions): Promise<ProjectWorldDto>;<br>getActive(): Promise<ProjectWorldDto | undefined>;<br>getLoaded(): Promise<ProjectWorldDto[]>; |
ScriptContext
| Member |
|---|
readonly assets: AssetCatalog; |
readonly components: Record<string, ComponentPayload>; |
readonly componentTypes: EngineComponentCatalog; |
readonly uiTypes: UIEngineCatalog; |
readonly room: RoomHost; |
readonly match: MatchHost; |
readonly team: TeamHost; |
readonly ui: UiHost; |
readonly warehouse: WarehouseHost; |
readonly audio: AudioHost; |
readonly physics: PhysicsHost; |
readonly navigation: NavigationHost; |
readonly terrain: TerrainHost; |
readonly water: WaterHost; |
readonly world: WorldHost; |
readonly events: CustomEventHost; |
readonly network: NetworkHost; |
readonly platform: PlatformHost; |
readonly camera: CameraHost; |
readonly script: ScriptRuntimeSelf; |
readonly entity: EntityAccessor; |
readonly props: Record<string, unknown>; |
readonly tickedAt: string; |
readonly delta: number; |
readonly trigger: string; |
readonly random: RandomHost; |
readonly debug: LogHost; |
readonly info: LogHost; |
readonly warn: LogHost; |
readonly error: LogHost; |
readonly log: LogHost; |
AudioHost
| Member |
|---|
play(assetId: string, options?: { volume?: number; pitch?: number; loop?: boolean; at?: Vector3; target?: string }): AudioHandle; |
playSpatial(assetId: string, position: Vector3, options?: { volume?: number; pitch?: number; loop?: boolean }): AudioHandle; |
stop(handle: AudioHandle): void; |
setVolume(handle: AudioHandle, volume: number): void; |
setBackgroundMusic(assetId: string, options?: { volume?: number; pitch?: number; loop?: boolean }): AudioHandle; |
AuthoringSdkHost
| Member |
|---|
readonly project: ProjectAuthoringSdkHost; |
readonly entity: EntityAuthoringHost; |
readonly component: ComponentAuthoringHost; |
readonly script: ScriptAuthoringHost; |
readonly material: MaterialAuthoringHost; |
readonly prefab: PrefabAuthoringHost; |
readonly instance: InstanceAuthoringHost; |
readonly world: WorldAuthoringHost; |
readonly reference: ReferenceAuthoringHost; |
CameraHost
| Member |
|---|
addLookInput(delta: Vector3): void; |
setLookSensitivity(degreesPerUnit: number): void; |
setPitchClamp(minDeg: number, maxDeg: number): void; |
setViewTarget(target: string, offset?: Vector3): void; |
ComponentAuthoringHost
| Member |
|---|
put(entityId: string, componentKey: string, value: Record<string, unknown>, options?: ComponentAuthoringMutationOptions): Promise<ComponentAuthoringResult>; |
patch(entityId: string, componentKey: string, patch: Record<string, unknown>, options?: ComponentAuthoringMutationOptions): Promise<ComponentAuthoringResult>; |
patchField(entityId: string, componentKey: string, value: unknown, options: ComponentFieldAuthoringMutationOptions): Promise<ComponentAuthoringResult>; |
delete(entityId: string, componentKey: string, options?: ComponentAuthoringMutationOptions): Promise<ComponentAuthoringResult>; |
setOverride(entityId: string, componentKey: string, patch: Record<string, unknown>, options?: ComponentAuthoringMutationOptions): Promise<ComponentAuthoringResult>; |
CustomEventHost
| Member |
|---|
emit(eventKey: string, payload?: Record<string, unknown>, targetEntityId?: string): void; |
EntityAuthoringHost
| Member |
|---|
find(name: string): Promise<ProjectEntityDto | undefined>; |
findByTag(tag: string): Promise<ProjectEntityDto[]>; |
findByComponent(type: string): Promise<ProjectEntityDto[]>; |
duplicate(entityId: string, options?: EntityDuplicateOptions): Promise<ProjectEntityDto[]>; |
setParent(entityId: string, parentId: string | null, options?: EntitySetParentOptions): Promise<ProjectEntityDto>; |
setSiblingOrder(entityId: string, order: number, options?: AuthoringMutationOptions): Promise<ProjectEntityDto>; |
getChildren(entityId: string): Promise<ProjectEntityDto[]>; |
getDescendants(entityId: string): Promise<ProjectEntityDto[]>; |
EntityHandle
| Member |
|---|
readComponent<T extends BuiltInComponentType>(componentTypeOrKey: T): BuiltInComponentPayload<T> | undefined; |
readComponent(componentTypeOrKey: ProjectComponentType): Record<string, unknown> | undefined; |
script(scriptIdOrKey: string): ScriptRuntimeSelf | undefined; |
addComponent(...args: MutableBuiltInComponentMutationArgs): void; |
addComponent(componentType: ProjectComponentType, data: Record<string, unknown>): void; |
patchComponent(...args: MutableBuiltInComponentMutationArgs): void; |
patchComponent(componentType: ProjectComponentType, patch: Record<string, unknown>): void; |
replaceComponent(...args: MutableBuiltInComponentMutationArgs): void; |
replaceComponent(componentType: ProjectComponentType, data: Record<string, unknown>): void; |
removeComponent<T extends MutableBuiltInComponentType>(componentTypeOrKey: T): void; |
removeComponent(componentTypeOrKey: ProjectComponentType): void; |
setParent(parentId: string, options?: { parentAnchor?: string; siblingOrder?: number; hierarchyFlags?: RuntimeEntitySnapshot["hierarchyFlags"] }): void; |
detach(options?: { keepWorldTransform?: boolean }): void; |
setTag(tag: string): void; |
removeTag(tag: string): void; |
hasTag(tag: string): boolean; |
setName(name: string): void; |
parent(): RuntimeEntitySnapshot | undefined; |
children(): RuntimeEntitySnapshot[]; |
descendants(options?: { maxDepth?: number }): RuntimeEntitySnapshot[]; |
ancestors(): RuntimeEntitySnapshot[]; |
InputActionEvent
| Member |
|---|
actionKey: string; |
actorId?: string; |
entityId?: string; |
phase?: "pressed" | "released" | "held" | "sample" | "cancel"; |
valueType?: "boolean" | "float" | "vector1d" | "vector2d" | "vector3d" | "quaternion" | "world_target" | "screen2d" | "trigger" | "composite"; |
value?: unknown; |
sourceBindingId?: string; |
inputProfileVersion?: number; |
actionSeq?: number; |
clientSampleTimeMs?: number; |
payload: Record<string, unknown>; |
InstanceAuthoringHost
| Member |
|---|
getPrefab(instanceId: string): Promise<ProjectPrefabDto | undefined>; |
getOverrides(instanceId: string): Promise<PrefabOverride[]>; |
LogHost
| Member |
|---|
(message: string, metadata?: Record<string, unknown>, level?: LogLevel): void; |
debug(message: string, metadata?: Record<string, unknown>): void; |
info(message: string, metadata?: Record<string, unknown>): void; |
warn(message: string, metadata?: Record<string, unknown>): void; |
error(message: string, metadata?: Record<string, unknown>): void; |
MatchHost
| Member |
|---|
getState(): Record<string, unknown>; |
setPhase(phaseKey: string, reason?: string, metadata?: Record<string, unknown>): void; |
addScore(subjectKey: string, amount: number, scoreboardKey?: string, reason?: string): void; |
getScore(subjectKey: string, scoreboardKey?: string): number; |
patchObjective(objectiveKey: string, patch: Record<string, unknown>, reason?: string): void; |
MaterialAuthoringHost
| Member |
|---|
applySemanticPatch(materialIdOrKey: string, patch: MaterialSemanticPatchAuthoringRequest): Promise<MaterialSemanticPatchAuthoringResult>; |
NavigationHost
| Member |
|---|
findPath(worldId: string, from: Vector3, to: Vector3, agentProfileKey?: string): NavigationPathResult; |
nearestPoint(worldId: string, point: Vector3, agentProfileKey?: string): Vector3 | null; |
isReachable(worldId: string, from: Vector3, to: Vector3, agentProfileKey?: string): boolean; |
raycast(worldId: string, from: Vector3, to: Vector3, agentProfileKey?: string): NavigationRaycastResult; |
steerToward(worldId: string, from: Vector3, to: Vector3, maxStep: number, agentProfileKey?: string): NavigationSteerResult; |
NetworkHost
| Member |
|---|
sendMessage(channel: string, payload?: Record<string, unknown>, playerId?: string): void; |
PhysicsHost
| Member |
|---|
occupancyQuery(worldId: string, cellKey: string): ReadonlyArray<string>; |
shapecast(shape: PhysicsOverlapShape, transform: { position: Vector3; rotation?: Vector3 | { x: number; y: number; z: number; w: number } }, direction: Vector3, distance: number, filter?: PhysicsQueryFilter): PhysicsHit | null; |
overlapTest(shape: PhysicsOverlapShape, transform: { position: Vector3; rotation?: Vector3 | { x: number; y: number; z: number; w: number } }, filter?: PhysicsQueryFilter): string[]; |
command(entityId: string, bodyCommand: PhysicsBodyCommand): void; |
PlatformHost
| Member |
|---|
requestPointerLock(): void; |
exitPointerLock(): void; |
requestFullscreen(target?: "document" | "viewport"): void; |
exitFullscreen(): void; |
PrefabAuthoringHost
| Member |
|---|
create(entityId: string, options?: PrefabCreateOptions): Promise<ProjectPrefabDto>; |
instantiate(prefabId: string, options?: PrefabInstantiateOptions): Promise<ProjectEntityDto[]>; |
applyOverrides(instanceId: string, scope?: PrefabOverrideScope, options?: AuthoringMutationOptions): Promise<unknown>; |
revertOverrides(instanceId: string, scope?: PrefabOverrideScope, options?: AuthoringMutationOptions): Promise<unknown>; |
unpack(instanceId: string, options?: AuthoringMutationOptions): Promise<ProjectEntityDto[]>; |
ProjectAuthoringHost
| Member |
|---|
createFolder(path: string, options?: ProjectCreateFolderOptions): Promise<ProjectResourceFolderDto>; |
moveAsset(assetId: string, newPath: string, options?: ProjectMoveAssetOptions): Promise<unknown>; |
findAsset(name: string): Promise<ClientProjectAssetResource | undefined>; |
uploadAsset(file: AuthoringUploadFile, folder: string, options?: ProjectUploadAssetOptions): Promise<ClientProjectAssetResource>; |
applySmartAssetPackage(packageKey: string, options?: SmartAssetPackageApplyOptions): Promise<SmartAssetPackageApplyReceipt>; |
setMultiplayerBlueprint(definition: RuntimeMultiplayerBlueprintDefinitionDto, options?: AuthoringMutationOptions): Promise<unknown>; |
createAssetPackPreviewBatch(request: AssetPackPreviewBatchRequest, options?: AuthoringMutationOptions): Promise<AssetPackPreviewBatchResult>; |
reviewAssetPackPreviewBatch(batchId: string, request: AssetPackPreviewReviewRequest, options?: AuthoringMutationOptions): Promise<AssetPackGenerationBatch>; |
startAssetPackFinalGeneration(batchId: string, options?: AuthoringMutationOptions): Promise<AssetPackGenerationBatch>; |
ProjectAuthoringSdkHost
| Member |
|---|
applySmartAssetPackage(packageKey: string, options?: SmartAssetPackageApplyOptions): Promise<InternalSmartAssetPackageApplyReceipt>; |
RandomHost
| Member |
|---|
(): number; |
range(min: number, max: number, stream?: RandomStream): number; |
int(min: number, max: number, stream?: RandomStream): number; |
bool(p?: number, stream?: RandomStream): boolean; |
sign(stream?: RandomStream): -1 | 1; |
pick<T>(array: readonly T[], stream?: RandomStream): T | undefined; |
weightedPick<T>(items: readonly T[], weights: readonly number[], stream?: RandomStream): T | undefined; |
shuffle<T>(array: readonly T[], stream?: RandomStream): T[]; |
unitVector(stream?: RandomStream): Vector3; |
pointInSphere(radius: number, stream?: RandomStream): Vector3; |
pointInCircle(radius: number, stream?: RandomStream): Vector3; |
gaussian(mean?: number, std?: number, stream?: RandomStream): number; |
seeded(seed: string | number): RandomStream; |
ReferenceAuthoringHost
| Member |
|---|
resolve(ref: EntityRef | PrefabRef | ComponentRef | AssetRef | WorldRef): Promise<unknown>; |
isValid(ref: EntityRef | PrefabRef | ComponentRef | AssetRef | WorldRef): Promise<boolean>; |
repair(entityId: string, newTarget: string, options: ReferenceRepairOptions): Promise<ProjectGraphOpDto[]>; |
assign(entityId: string, target: string, options: ReferenceAssignmentOptions): Promise<ProjectGraphOpDto[]>; |
clear(entityId: string, options: ReferenceAssignmentOptions): Promise<ProjectGraphOpDto[]>; |
RoomHost
| Member |
|---|
getState(): Record<string, unknown>; |
RuntimeEntitySnapshot
| Member |
|---|
id: string; |
key: string; |
worldId?: string; |
name?: string; |
parentEntityId?: string | null; |
parentAnchor?: string | null; |
siblingOrder?: number | null; |
hierarchyFlags?: { keepWorldTransformOnDetach?: boolean; inheritReplication?: boolean; cascadeDespawn?: boolean; }; |
position?: Vector3; |
tags: string[]; |
components?: Record<string, unknown>; |
runtime?: Record<string, unknown>; |
ScriptAuthoringHost
| Member |
|---|
applySemanticPatch(scriptIdOrKey: string, patch: ScriptSemanticPatchAuthoringRequest): Promise<ScriptSemanticPatchAuthoringResult>; |
applyScenarioHelper(scriptIdOrKey: string, helper: ScriptScenarioAuthoringHelperId, options?: ScriptScenarioAuthoringOptions): Promise<ScriptSemanticPatchAuthoringResult>; |
ScriptFunctionHost
| Member |
|---|
ScriptVariableHost
| Member |
|---|
get<T = unknown>(variableIdOrName: string): T; |
get<T = unknown>(scriptIdOrKey: string, variableIdOrName: string): T; |
set<T = unknown>(variableIdOrName: string, value: T): void; |
set<T = unknown>(scriptIdOrKey: string, variableIdOrName: string, value: T): void; |
TeamHost
| Member |
|---|
getAssignment(): Record<string, unknown>; |
TerrainHost
| Member |
|---|
heightAt(worldId: string, x: number, z: number): number; |
normalAt(worldId: string, x: number, z: number): Vector3; |
slopeAt(worldId: string, x: number, z: number): number; |
sampleLayerWeights(worldId: string, x: number, z: number): number[]; |
raycastDown(worldId: string, x: number, z: number, fromY: number): PhysicsHit | null; |
UiHost
| Member |
|---|
readonly catalog: UIEngineCatalog; |
openPanel(panelKey: string, payload?: Record<string, unknown>): void; |
closePanel(panelKey: string): void; |
setWidgetValue(panelKey: string, widgetKey: string, value: unknown): void; |
WarehouseHost
| Member |
|---|
get(key: string, recordKey: string): Record<string, unknown> | undefined; |
create(key: string, recordKey: string, value: Record<string, unknown>): void; |
update(key: string, recordKey: string, patch: Record<string, unknown>): void; |
increment(key: string, recordKey: string, changes: Record<string, number>): void; |
append(key: string, recordKey: string, path: string, value: unknown): void; |
set(key: string, recordKey: string, value: Record<string, unknown>): void; |
query(key: string, filter?: Record<string, unknown>, options?: WarehouseQueryOptions): WarehouseQueryResult; |
query(key: string, options?: WarehouseQueryOptions): WarehouseQueryResult; |
delete(key: string, recordKey: string): void; |
WaterHost
| Member |
|---|
surfaceLevelAt(worldId: string, x: number, z: number, atTimeMs?: number): number; |
isSubmerged(worldId: string, point: Vector3): boolean; |
WorldAuthoringHost
| Member |
|---|
load(name: string, options?: AuthoringMutationOptions): Promise<ProjectWorldDto>; |
unload(name: string, options?: AuthoringMutationOptions): Promise<ProjectWorldDto>; |
getActive(): Promise<ProjectWorldDto | undefined>; |
getLoaded(): Promise<ProjectWorldDto[]>; |