using UnityEngine;
using System.Collections;
using UnityEditor;

// ** created by following the Creating An In-Game Shop Unity tutorial **
public class CreateWeapon {

    [MenuItem("Assets/Create/New Weapon")] // can create this by going assets > create > new weapon
    public static void MakeWeapon() {
        WeaponStats weapon = ScriptableObject.CreateInstance<WeaponStats>();
        AssetDatabase.CreateAsset(weapon, "Assets/NewWeapon.asset"); // we can edit fields in inspector
        AssetDatabase.SaveAssets();
        EditorUtility.FocusProjectWindow();
        Selection.activeObject = weapon; // able to highlight it
    }
	
}