Items¶
The horror game template supports item-related mechanics including Collectable Item, Inspectable Item, Openable Item, Draggable Item, and Cross-scene item.
Let's take Collectable Item as an example. This smart asset enables an object in the scene collectable.
In our example we want to make a key collectable, here's how we do this:
-
Find the smart asset in Asset Box under Horror Asset > Gameplay and add it to the scene.
-
In Scene Explorer, view the hierarchy of the smart asset. All we need to do is replace a model with a collider attached with the default cup model, and see if we need to adjust any other settings in the Logic folder.
-
Find a model named Key and add it to the scene.
-
Drag this model into the Logic folder and remove the cup model. Since the key model comes with a collider, we don't need to add one.
-
Select the Logic folder and open its properties window. We change the TipsText to A key and its UI icon to star-shaped.
Then this key becomes a collectable in the scene: