Dataset
π Dataset Class
A dataset that can be given to items. This is meant to be a parent class of your own dataset object.
Namespace:
Esper.Inventool.ItemsAccess:publicType:classInherits:InventoolObject
π¦ Fields
public static
resourcesPath
string
The path to all generated objects of this type relative to the resources folder.
public
item
Item
The item reference. (Hidden in inspector)
π Properties
public static
DirectoryPath
string
The directory of all generated objects of this type. (Editor only)
Create Custom Dataset
Datasets let you set custom data through the Items section of the Inventool window when set up correctly. See the steps below to learn how to create a custom dataset.
Step 1: Inherit From Dataset
Create a new class and inherit from the Dataset class.
Step 2: Create Asset Menu Option
Dataset is a ScriptableObject class, which means it can be added to the asset menu.
Step 3: Add Custom Fields
Add your custom fields. If they are serializable, they will be available for each item in the Items section.
Step 4: Set For All Items
All you have left to do now is to create a new instance of your custom dataset from the asset menu and set it as the dataset reference for items from Settings.
Accessing Dataset At Runtime
You can access the dataset from an Item. Note that the field is stored as the default Dataset type, so you may need to convert it to your dataset type.
Last updated