Hey, I want to add my script (an Item-script with name, ID and image) to the menu at “Assets/Create”. I can display it when I right-click, but I want to know, how to add a new instance of this class to the files when I click on it, just like you do with materials and C# scripts. How do I do this?
The script looks like this:
using UnityEngine;
using System.Collections;
using UnityEditor;
public class Item {
public Sprite itemImage;
public string itemName;
public string itemID;
public Item(Sprite image,string name, string ID) {
itemImage = image;
itemName = name;
itemID = ID;
}
}