Info |
---|
For an overview of Resources, click here. |
Table of Contents |
---|
Overview
The Spawn Asset resource allows the author to spawn any type of asset instance into a scene. The asset is spawned at the specified position.
The types of assets that can be spawned include:
Unity Assets
Binary Assets
Required Fields
Field Name | Description |
---|---|
Asset Instance | Specifies the asset to be spawned. Only Unity Assets can be attached to this field. The Assemblers will create these that include either one prop or most commonly a collection of props. These likely have the position built in. |
Optional Fields
Field Name | Description |
---|---|
Position | Specifies the position at which the asset should spawn and used if the Assembler has not set the position of the Unity Asset. This position can be one of two types: Fixed Position or Relative Position. The Fixed Position setting allows the author to configure the coordinates of the Positional Anchor, as well as its rotation. The Relative Position setting allows the author to configure the angle, distance, and elevation of the Positional Anchor, as well as its rotation. |
Events
Example in the Headset
In the Motive Lab, I want to spawn the supplies, lab equipment, and more.
Add a Spawn Asset resource to the frame
Click on “Asset Instance” then “Asset” and you will see that the catalogs for any created Unity Assets appear:
Choose the Unity Asset
In my example, I’ve created several Spawn Asset resources, and attached the Unity Assets to each:
It is very important to remember that you do not want to use an End Script Resource in a script that has Spawned Assets. If you do, the assets will disappear. Instead, it’s recommended to create an “Assets Spawned” custom event that is Global, so that you can use it anywhere in the project as a condition:
Training Tip:
If you are spawning a large number of assets at once, it can lead to some stuttering in the headset. To mitigate the motion sickness that can result, you can fade the scene out while the assets spawn. We also suggest using a Screen Message Resource to let the leaner know what is about to happen.
In this example, here is what the frames would look like with the Fade Out/In and Screen Message:
Here is what this would look like in the headset, complete with the fade scene and screen message tips:
https://vimeo.com/712070269To view this video in full screen, please click here.