Quick answer: Action names are bare strings — a rename in the Input Map doesn’t update any script. Centralize them in a constants file (or use exported action names) so the rename touches one place.
After renaming “jump” to “player_jump” in Project Settings → Input Map, the game errors with “action not found” — every is_action_pressed("jump") across the codebase is now wrong.
Centralize Action Names
# input_actions.gd (autoload or static)
const JUMP := &"player_jump"
const MOVE_LEFT := &"move_left"
const MOVE_RIGHT := &"move_right"
Use &"..." (StringName) for input actions — it’s what Input expects and avoids per-call allocation. Reference InputActions.JUMP everywhere.
One Rename, One Edit
if Input.is_action_just_pressed(InputActions.JUMP):
jump()
Now renaming “jump” means editing the Input Map and the one constant. Every call site follows automatically.
Validate at Startup
func _ready():
for action in [InputActions.JUMP, InputActions.MOVE_LEFT, InputActions.MOVE_RIGHT]:
assert(InputMap.has_action(action), "Missing input action: " + action)
A startup assert turns a silent runtime error into a loud, immediate one.
Verifying
Rename an action; update the one constant; the whole game uses the new name. The startup assert catches any action that doesn’t exist in the map.
“Action names are stringly-typed. Centralize them so a rename is a one-line change, not a hunt.”
The startup-assert pattern is cheap insurance — it also catches typos and missing actions on a fresh checkout.