I’m trying to reference a script that I’m calling multiple times in order to shorten the code and lessen the amount of total calls but when I do that, the functionality messes up for some reason (See example below).
public override void Equip()
{
transform.parent.GetComponent<SlotState>().DoThis();
transform.parent.GetComponent<SlotState>().DoThat);
}
public override void EquipV2()
{
SlotState itemSlotState = transform.parent.GetComponent<SlotState>();
itemSlotState.DoThis();
itemSlotState.DoThat();
}