Hello!

I'm currently working on a spell system for my game where each spell is defined as a resource. This resource includes various properties about how the spell acts, one of which is a "targeting" variable. The targeting variable is meant to differentiate between different spell types (e.g., "target ground", "cone", "beam"). Additionally, I want spells to have a callback function (callbackOnHit) to handle effects on hit, such as affecting enemies in specific ways.

To achieve this, I attempted to use @export var targeting: Callable for defining targeting strategies and callback functions. However, the Godot editor doesn't allow me to edit these Callable variables directly in the UI, which complicates the setup process for each spell.

Has anyone faced a similar issue or have any suggestions on how to make Callable variables editable in the Godot editor? Or is there an alternative approach to implementing this functionality that aligns better with Godot's design philosophy?

Any advice or pointers towards relevant documentation or examples would be greatly appreciated. Thank you in advance for your help!

Personally I don't think it's a good idea to have editable 'Callable' type variable in editor inspector tab, maybe it's more simple and maintainable if you make a list of Callable prototypes in a centralized file named CallableManager or something, then edit their name via @export variable in that file's attached Node in inspector.

    MagickPanda I was thinking something like that, maybe the export variable instead of being a callable it could be a string with the name of the method and just use .call().

    Or just create a method on the resource and call that. Using strings is fragile and will lead to errors.