0 votes

It is possible to draw a variable on screen but on scene that has no label node?
I want it only for debug purpose. It will be like using print() but in realtime on screen

asked Apr 21, 2018 in Engine by Huder (32 points)

1 Answer

+1 vote
answered Apr 21, 2018 by kidscancode (6,610 points)

What i need to put in font argument when i want use default one?

You need a Font resource, which you can load() if you already have one (recommended), or create dynamically.

How you load a font depends on whether you want to use DynamicFont or BitmapFont. The latter is a little easier, especially if you already have a ".fnt" file. I recommend reading through those docs to see how it all works.

It's probably easiest to use the editor to add the font to a node (such as Label) and then save the resource. Once you have a saved resource, you can reuse it anywhere you want.

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.