Items

Ensure items are in a folder called Resources.

Getting An Item

The first parameter is the name of QTItem scriptable object. The second parameter is it's path in the resources folder.

// The first parameter is the name of QTItem scriptable object
// The second parameter is it's path in the resources folder
var item = QT.GetItem("item object name", "path/in/resources");

If you've placed your items in the recommended folder (Assets/StylishEsper/QuestTree/Resources/ItemData), then it may not be necessary to specify a folder path unless the item is inside a subfolder within the ItemData folder.

Custom Object

Items accept a custom object type that can be set from the inspector. To access your custom object, you must use explicit type conversion.

var myItem = (MyType)item.customDataObject;

Last updated