Skip to content

Interface: InstantiatePrefabOptions ​

Options for SceneInstance.instantiatePrefab.

Requirements:

  • scene loaded with { mutable: true }
  • active engine catalog (the engine is installed/activated)
  • Prefab document has exactly one root node

The instance is runtime-only and is not written back to the scene document.

Properties ​

PropertyTypeDescription
assetstringAddressable Key, document alias, asset uid or workspace path.
parentRef?string | nullnull/omitted mounts at the scene root; otherwise a node ref.
name?stringDefaults to the Prefab file name.
layer?stringOptional instance layer; falls back to the Prefab source root.
tags?readonly string[]Optional instance tags; falls back to the Prefab source root when empty.
transform?Record<string, unknown>Merged over the catalog transform defaults.
overrides?Record<string, Record<string, unknown>>Prefab child uid -> JSON Pointer -> value, e.g. { n_body: { "/components/c_sprite/properties/tint": "#ff0000" } }.
uid?stringDefaults to a unique runtime uid (n_ + 16 hex). Must be unique.
signal?AbortSignalAborts Prefab loading; throws ABORTED with no partial instance.

Suity developer documentation · API generated by TypeDoc