|
YOM Replicator SDK 0.8.0.0
A metaverse SDK created by YOM
|
The Your Open Metaverse plugin allows creators to completely design their own inventory system. This guide will explain how to create your own inventory system and how to use your own inventory system in your metaspace.
The inventory system consists of buttons that can be pressed to spawn items. A single button needs to be designed for the system to work. To create a button you will have to create a new blueprint asset. Right-click in a folder in the Content Browser and under Create Basic Asset click on Blueprint Class.

This will open up the blueprint dialog box in which you can search for YomButton. Once you find the YomButton select it.

Name the button something like MyButton and open up the blueprint by double-clicking the new asset. In the blueprint editor, you will now have an empty screen, in which you will have to design your button. But before you start the button will need some widgets:
Canvas (Overlay)Button (Button)RarityWidget (Any Widget)LoadingWidget (Any Widget)All of these widgets also need to have the name of the items described above. In the default YomButton the hierarchy looks like this:

Not Hit-Testable (Self & All Children) by clicking on the RarityWidget in the hierarchy and going to Details -> Behavior -> Visibility. This prevents the Rarity widget from 'overlapping' the button which would prevent a user from pressing the button.Create another blueprint like in step 1, but this should have YomPlayerInventoryWidget selected.

Give this a name as well like MyPlayerInventoryWidget and open up the blueprint by double clicking the new asset. This will again give you an empty screen. On this screen, you can design your layout of the inventory. It will need one widget:
Scroll Box)The hierarchy of the default InventoryWidget looks like this:

Furthermore, your MyPlayerInventoryWidget needs to have some settings applied to it before it works. Click on MyPlayerInventoryWidget in the hierarchy and go to Details -> Yom Inventory. Here you will see the following settings:
Yom Button WidgetBase Button WidgetBaseButtonWidget in the hierarchy, but if it is not set, you can set it hereStart Button AmountCreate another blueprint like in step 1, but this should have YomInventoryComponent selected.

Give this a name as well like MyInventory and open up the blueprint by double clicking the new asset. In the asset, you will have to set one setting. Go to Details -> Yom Inventory Component -> Inventory Widget and set it to the widget you created in Step 2
Open your MetaspacePlayer and under components remove YomDefaultInventory if present. Then add the component that you created in step 3. When you start the game now you can see your own inventory in action when pressing 'I' while playing.