0 votes

rect_size gives an error message “Nonexistent function”

in Engine by (88 points)

1 Answer

0 votes
Best answer

Sounds like you tried something like this:

$button.rect_size(Vector2(100, 200))

Setting variables inside godot (since 3) nearly always works by simply assigning them to the new value like this:

$button.rect_size = Vector2(100,200)

Hope it solves your problem. If not, please give some further information like: your code, the original error message, etc.

Thanks, Jowan

by (864 points)
selected by

Yes, I tried this)

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.