Reports GDScript variables and constants that are declared but never used.
This inspection helps keep your scripts clean by detecting local variables and const declarations that have no usages in the project scope. If a type hint is present but refers to an unresolved type, the declaration is ignored to prevent false positives.
示例:
var tmp = 42 # unused, will be reported
const PI2 = PI * 2 # unused, will be reported
var enemy: UnknownType # ignored if UnknownType cannot be resolved
Quick fix actions:
The inspection does not report declarations that are referenced anywhere in the project. It also skips declarations with unresolved type to avoid false alarms.