I have the following error after updating to WeaponConfig : EquipableItem
Cannot convert type via a reference conversion, boxing conversion, unboxing conversion, wrapping conversion, or null type conversion
Went through the steps a few times and unsure where the error could be.
private void UpdateWeapon()
{
var weapon = equipment.GetItemInSlot(EquipLocation.Weapon) as WeaponConfig;
if (weapon == null)
{
EquipWeapon(defaultWeapon);
}
else
{
EquipWeapon(weapon);
}
}
private Weapon AttachWeapon(WeaponConfig weapon)
{
return weapon.Spawn(rightHandTransform);
}