Getting started
Getting Started
Using an Existing Unity Project
Package Types
Spaces & Space Templates
Custom Avatars
Custom Avatar Animations
Custom Prefab Objects
World Building
‣
‣
Quests and Rewards
Scripting
‣
‣
Guidelines
Supported Features and Limitations
Performance Guidelines
Lighting
Publishing to Spatial
Finding Published Packages
Support
FAQs
Help and Community
Release Notes
Custom Prefab Objects
This component allows for defining a custom object to be used in Spatial. Custom prefab objects let you create any type of interactive object that can be loaded into the space, like furniture, vending machines, vehicles, interactive jukeboxes, etc. These can be interacted with using your avatar or even other custom objects. This is to be used in conjunction with the
Prefab Object
package type, which you can reference in the package configuration.How To Use
Find examples of prefab objects in the Starter Template
Setting up a prefab object is almost as easy as creating prefabs in Unity.
- First, start by creating your custom object as a Unity Prefab, and add the
Spatial Prefab Object
component to the root GameObject. You may add additional effects, like particle systems or audio sources, if you would like. Creating a custom object without any visuals is not recommended since the avatar will not be able to interact with it. - Once you have your prefab ready, create a new “PrefabObject” package
- Then, give it a name (this name will be what shows up in the content menu / inventory inside the Spatial app) and drag the prefab you created in step 1 into the
Prefab
field. - You will also need to specify a thumbnail of size exactly
512x512
in an uncompressed format - To test this package, make sure it is the “active package” inside the project configuration panel and then press the
Test Active Package
button inside the main toolbar.
Limitations
These limitations are subject to change at any time
Currently there are very few limitations on what you can do with prefab objects, but we may introduce new rules before this feature is out of beta.
← Previous
Next →