Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | melody1 |
Is there an editor shortcut or plugin that can generate a setter and/or getter function from the declaration of a variable in gdscript? It is tedious to type out a function for every variable that could easily be created automatically using only the information in the line declaring the variable. For example if I have a variable
var _long_variable_name setget set_long_variable_name
I would like to be able to select that line and press a keyboard shortcut in the script editor and have a setter function created below as such:
func set_long_variable_name(long_variable_name):
_long_variable_name = long_variable_name
If this is currently possible then it would save me a lot of time and tendon pain!
Thanks!