How to place a non monobehaviour script into an array in inspector

It may be that I am tired but I cannot seem to figure out how to place a script that doesnt inherit from monobehaviour into an array of that type in the editor/inspector



public class BaseWeapon
public string Name {get; set;}
public int Damage {get; set;}
public int Ammo {get; set;}

`  // Constructor
  public BaseWeapon BaseWeapon(string name, int dmg, int ammo)
     Name = name;
     Damage = dmg;
     Ammo = ammo;



// DIFFERENT SCRIPT public class WeaponPickup : MonoBehaviour { public BaseWeapon[] weapons;

``` private BaseWeapon weaponToDrop; void Awake() { if(weapons.Length > 1) weaponToDrop = GetRandomWeapon(); else weaponToDrop = weapons[0]; } void OnTriggerEnter(Collider other) { if(other.gameObject.tag == "Player") { other.sendMessage("GetWeapon", weaponToDrop); } } ```


// DIFFERENT SCRIPT public class Handgun : BaseWeapon { public BaseWeapon weapon = new Baseweapon("Handgun", 5, 30); }

// DIFFERENT SCRIPT public class PlayerScript : MonoBehaviour { public Projectile projectile;

private BaseWeapon equippedWeapon; private BaseWeapon[] weapInventory;

void GetWeapon(BaseWeapon weap) { int i = weapInventory.Length; weapInventory *= weap;* _equippedWeapon = weapInventory*;*_ _*}

*_ _*

void Update()*_ _*{*_ _*if(Input.GetAxis("Fire1")*_ _*{*_ _*FireWeapon();*_ _*}*_ _*}

*_ _*

void FireWeapon()*_ _*{*_ _*if(equippedWeapon.Ammo > 0)*_ _*{*_ _*GameObject tempProj = (GameObject)Instantiate(projectile, transform.position,*_ _*transform.rotation);*_ _*Projectile proj = tempProj.GetComponent("Projectile");*_ _*tempProj.damage = equippedWeapon.Damage;*_ _*equippedWeapon.Ammo--;*_ _*}*_ _*}*_ _*}*_ _*



Now in the above code I have a MonoBehaviour script attached to a GameObject and it displays the weapons array but when I add more elements to it I cant just drag the BaseWeapon script to the element.

Im wanting to do this so the level designers can easily drag the weapon that they want the pickup to drop into the array, theres also code in place to select one at random if more than one weapon is in the array.

EDIT: Added additional code, Projectile is just a monobehaviour which has a public var damage and simply moves the go forward and sends the damage variable to whatever it hits.
This code is not my original as I am not at home atm so i just hand typed this myself and it is not complete such as there is also a function to allow the player to cycle thru their weapons but i left it out for this… If any additional info is needed let me kno

Thanks in advanced

You seem to have a misunderstanding of what

public BaseWeapon[] weapons;

is. It is an array of references to instantiated objects, not an array of classes. If you have a prefab with a BaseWeapon object attached to it, then you can drag that prefab onto a slot in the weapons array. If that's not what you want to do, my next guess would be that you want an array of enums. If this isn't enough to get you going, further description and code for what you want to do will be necessary to help you.