Closed TheYellowArchitect closed 2 months ago
Could it be that you're missing a @tool
attribute in your script (AvatarInventory
)?
Inventory
is defined as @tool
so that the inventory editor can run within the Godot editor. I'm guessing this does not automatically translate to derived classes.
You are correct. Thanks!
I leave this issue open because it's a Godot bug for an inherited class to not inherit the tool annotation (I assume InventoryItem extension has the same problem)
Turns out the Godot developers don't consider this to be a bug: https://github.com/godotengine/godot-proposals/issues/754#issuecomment-629504506 but it looks like there will be a warning for these kinds of problems in Godot 4.4.
Anyways, I think the documentation might need to be updated to make this clear.
Anyways, I think the documentation might need to be updated to make this clear.
Done in d5423f4c0e18ace7d6002bdc5dcbeca824d912ac
I made a class
AvatarInventory
which extends fromInventoryGridStacked
Works all fine and good until I try to add/remove items in the inspector. It seems the Editor UI for that doesn't take into account that theInventoryGridStacked
doesn't exist and to check for ancestor for these functionsBelow is the output console