0 votes


I do not want to use a label. I would like to make a sprite where the image is just a string. as such its a little impractical to creature a texture of every string and import into the project, so I am looking for a solution where when the sprite is created dynamically I can assign its "text texture" value.

Thanks again!

in Engine by (146 points)

1 Answer

+1 vote
Best answer

I would suggest using CanvasItem.draw_string() for this.

See Custom Drawing in 2D if you're unfamiliar with the custom drawing workflow.

by (20,897 points)
selected by

Exactly what I was looking for. Thank you.

BTW, your website is amazing. For all others not in the know, check it out here: http://kidscancode.org/

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.