I have a string field. I want to show a dropdown on FC inspector. I write an attribute drawer called ListSource. I send “Function Name” (AbilityList) as a string to that drawer. How can a drawer access to source class, call a function on the source class?
Within an AttributeDrawer, you can access the source object with the ‘.context’ property. You can then use reflection to call a function by name or in this case get a field (AbilityList) by name. Here is an example of such a drawer: