SpawnPrefabObject

Method

Spawns a prefab object from a specific package uploaded thru Spatial Studio.

Definition

SpawnPrefabObjectRequest SpawnPrefabObject(AssetType assetType, string assetID, Vector3 position, Quaternion rotation)
SpawnPrefabObjectRequest SpawnPrefabObject(AssetType assetType, string assetID, Vector3 position, Quaternion rotation)

Returns SpawnPrefabObjectRequest

Parameters

ParameterDescription
AssetType assetType

Which asset type to set this from. BackpackItem is not supported here

string assetID

ID of the asset:

  • Package: The packageSKU found in Spatial Studio or Unity
  • EmbeddedAsset: The assetID specified in the UnitySDK.Editor.SpaceConfig in Unity Editor
Vector3 position

Position where an object should be instantiated.

Quaternion rotation

Rotation of the object to instantiate.