Hello. I was going through the signals tutorial and I couldn't get autocompletion to work correctly. Here's the code:
extends Node2D
onready var sprite: Sprite = $Sprite
func _on_Timer_timeout() -> void:
sprite.visible = !sprite.visible
Written like this "sprite." won't autocomplete the "visible" property, but when I write it like this:
func _on_Timer_timeout() -> void:
var sprite: Sprite = $Sprite
sprite.visible = !sprite.visible
It does autocomplete.
Am I doing something wrong?
Thanks in advance.