My answer to the lecture's challenge

Am I the first who is answering the challenge question? I hope, it’s the right place :wink:

My answer to why using an interface for the TooltipSpawner:
Because there might be other scripts where I want to reference to, not only the InventorySlotUI. There might not even only be the inventory, but e.g. an equipment UI, which shows my equipment and I also want to have tooltips there. Then I have an EquipmentSlotUI, which also implements the IItemHolder interface and I don’t need any changes to my TooltipSpawner.
Ok, that was more than one sentence :slight_smile:

1 Like

Well said.

Privacy & Terms