I’m trying to override a function but I keep get error that no suitable methods to override
Script A
[Createassetsmenu(filename = "weapon"), menuname("item/weapon")]
Public class Weaponclass : scriptableobject
{
New public string name = " newname";
Public sprite Icon = null;
Public GameObject weaponmodel = null;
Public Virtual void Shoot()
{
}
}
Script B
Public class Ak47 : monobehaviour {
Public Weaponclass myweapon
Public override void Shoot ()
{
Debug.Log("shooting " + myweapon.name);
}
}
As you seen above in script B the shoot() Function give error that no suitable shoot method to override which I have already declared the weapon that contain the virtual Function;
Any help thanks!.
}