using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;

public class InventoryItemAssetCreator : MonoBehaviour {
    [MenuItem("Assets/Create/Inventory Item")]
    public static void CreateAsset()
    {
        InventoryItem InventoryItemAssetCreator =
            ScriptableObject.CreateInstance<InventoryItem>();

        AssetDatabase.CreateAsset(InventoryItemAssetCreator,
            "Assets/newItem.asset");
        AssetDatabase.SaveAssets();

        EditorUtility.FocusProjectWindow();
        Selection.activeObject = InventoryItemAssetCreator;
    }
}
