- Edited
Here is my project (tested with GD4a15). The original tutorial is GD3 for 2D but I converted to GD4 for 3D.
If anyone would like to have a look because I'm not sure if it's my coding mistake or this part of tutorial is just not compatable with GD4.
https://github.com/j3du/inventorytest
Slot.gd is actually attached to panel slot.
Slot.gd part that causes error:
func refresh_style(): # PlayerInventory.active_item_slot == slot_index if SlotType.HOTBAR == slot_type and PlayerInventory.active_item_slot == slot_index: set('theme_override_styles/panel', selected_style)
Error appears at PlayerInventory.gd.
const SlotClass = preload("res://inventory/Slot.gd")
Thanks for the help.