Talos docs

SpawnPrefabOptions

Since 0.6

{@link SpawnOptions} that spawn a copy of a prefab file (docs/SPEC.md, "Prefabs").

Plain text

Signature

export interface SpawnPrefabOptions extends SpawnPlacement {
  /**
   * Project-relative path of a `*.prefab.json`, as a scene instance's `prefab.source` names it:
   * `"prefabs/imp.prefab.json"`. It need not be placed in any scene.
   */
  prefab: string
  like?: never
  /**
   * Overrides for this copy, keyed as a scene instance's are:
   * `{ "root/script:chase/props/speed": 5, "club/transform/scale": [2, 2, 2] }`. Every key must apply.
   */
  overrides?: Record<string, unknown>
}

Import: import type { SpawnPrefabOptions } from "@argus/api"

Members

MemberSignatureDescription
prefabprefab: stringProject-relative path of a *.prefab.json, as a scene instance's prefab.source names it: "prefabs/imp.prefab.json". It need not be placed in any scene.
likelike?: never
overridesoverrides?: Record<string, unknown>Overrides for this copy, keyed as a scene instance's are: { "root/script:chase/props/speed": 5, "club/transform/scale": [2, 2, 2] }. Every key must apply.