Create Your Own Case Contents

Create a Case Item

You can inspect the items in Demo > Cases > (Select any) > Items for example.

Visual

Most effective way of creating a Case Item visual is actually creating it in the panel because width and height of the visual is governed by the Grid Layout Group that is on the Strip Inner - Item Container.

Select Strip Inner - Item Container located in Generic Case Opening Panel from the hierarchy and add an UI Image to it. Then duplicate it until you can see it in the panel.

Now do your decoration to it and maybe add some icons or text.

Script

Now we need to handle the script for the item.

Create a script for your item. Then inherit from CaseItemBase.

using SolClovser.CaseOpeningToolkit.Base;

public class YourCaseItem : CaseItemBase
{    
}

Then add it to your item and save your item as a prefab. Don’t forget to clear the contents of Strip Inner - Item Container after doing this.

Config

We need to create a config file to store our case config.

Right click anywhere in the project window and select Create > Case Opening Toolkit > New Config.

Add your item to the filler items list in config. This list is used to populate the unimportant parts of the case such as the portion before your actual items show up.

Then add a Probability Group to the list and add your item to Items in it. Raise the probability slider. It’s probability will be 100% because it is the only item in the list.

Select your Case Config as the config for the panel. Now name your panel and save it as a prefab. Congratulations! You just created your first case.