I don't understand the purpose of setget
. I've searched Godot Docs, but all I found was "Defines setter and getter functions for a variable." I assumed this means it's a way to avoid writing out the full setter/getter function code.
So I tried this:
var warriorName setget setWarriorName, getWarriorName
But this gets me the error, Parser Error: setter function 'setWarriorName' not found in class.
So, I guess it doesn't let you skip typing out setters and getters?
What is the purpose of setget
?