Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- [CreateAssetMenuAttribute] // Had to add this
- public class ItemData : ScriptableObject // And inherit from this, and everything started working.
- {
- public string name; // Note: Name needs to be a unique identifier.
- public string description;
- public GameObject prefab;
- public ItemData Copy()
- {
- ItemData itemData = new ItemData();
- itemData.name = name;
- itemData.description = description;
- itemData.prefab = prefab;
- return itemData;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement