Item-Weapon Class

Hi everybody,
i have written these classes:

Item : Monobehaviour

Abstract Weapon : Item

Gun : Weapon
//Methods that use Coroutine for fire, recoil and others..

public void RechargeGun()
	{
		StartCoroutine(Recharge());
	}
	
	private IEnumerator Recharge()
	{
		yield return new WaitForSeconds(RechargeTime);
	}

This approach is correct?

If i try to instantiate a instance of Gun or Item and i initialize it, for example:

public Gun myGun = new Gun();

When i start the game, a message appear in the console:
You are trying to create a Monobehaviour using the ‘new’ keyboard. This is not allowed. Monobehaviour can only be added using AddComponent(). Alternatively, your script can inherit from ScriptableObject or no base class at all.

It’s not error but this message alert me…

Thanks at all, i need your help.

Yes, you cannot create anything that inherits from a Monobehaviour using new()

Instead you need to make a new game object and attach the component to it, for example:

GameObject myGunObject = new GameObject( "Gun" )
myGunObject.AddComponent< Gun >();

then you can do

Gun gun = myGunObject.GetComponent< Gun >();
gun.RechargeGun();

Ah, so i need a gameobject for initalize a new istance of Gun…

If I remove Item: Monobehaviour and i don’t use the coroutine, the result is better?