Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | momoko |
Situation:
I have a node “sprite”
I’m trying to use function “get_size” to get the size of an image attached to the node
Now I’m not sure how to make it work.
I tried "size = get_size ( ) "
and it shows: Parser Error: The method “get_size” isn’t declared in the current class.
But from what I seen here:Image — Godot Engine (3.0) documentation in English
It seems get_size is a built-in function, which means I don’t need to manually define it.
Can anybody give me some suggestions to solve this problem or learn to avoid such problems?