why does not work intelisense when i use get_node?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By bgegg

why i can not show get_rect function?
i tryed to restard project.
but the result is same
please help

enter image description here

:bust_in_silhouette: Reply From: kidscancode

Because there’s no way for the editor to know what type of node get_node() will return. You can use type hints for this:

getNode = get_node(".") as Sprite

But since get_node(".") is just getting the current node, it’s completely unnecessary. The script is already running on the Sprite and has access to its functions.

thanks!! i understand it

bgegg | 2019-05-08 22:32