+1 vote

I want to change the mouse to a custom image without success. What am I doing wrong. My code is below:

Input.set_custom_mouse_cursor(load("res://Graphics/UI/Cursors/InspectCursor.png"), 0)

The above code is placed in the ready() function. Thanks for your help.

in Engine by (289 points)

1 Answer

0 votes
Best answer

You are likely getting an error:

0:00:00:0849 - Condition ' texture->get-width() != 32 || texture->get-height() != 32 ' is true.

It seems like you must use a 32x32 image for a custom mouse cursor.

If you use another size, you get the above error.

by (1,549 points)
selected by
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 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 webmaster@godotengine.org with your username.