Godot Version
4.3
Question
I am creating a skill system where each skill belongs to one of four categories: Power, Knowledge, Perception, Creativity. I have a SkillCategory class to contain some information that will be common to all skills under that category (right now it’s just the color that category’s skills should be displayed in).
class_name SkillCategory
extends Resource
@export var name: String = ""
@export var short_name: String = ""
@export_multiline var description: String = ""
@export_color_no_alpha var color: Color = Color.WHITE
I then have a resource created for each category.
In the BaseSkill class, one of the exported variables is the SkillCategory.
class_name BaseSkill
extends Resource
@export var name: String = ""
@export var short_name: String = ""
@export var category: SkillCategory = null
@export_file var icon: String = ""
@export_multiline var description: String = ""
I know I can then set the category in the inspector by clicking on the dropdown > Quick Load, and selecting the desired resource file.
But is there any way to pre-populate the dropdown with the four available SkillCategory resources, sort of similar to this screenshot where the dropdown is pre-populated with different Texture types. (I know it’s not quite the same thing since these are class types, not resources, but it’s the closest example I could find to what I’m going for).



