0 votes

I attached a script to a node. It's using _draw() (draw_rect) to create some rectangles. I'm curious if it's possible to get these rectangles to show up on the 2d Scene Editor as well?

in Engine by (307 points)

2 Answers

+1 vote
Best answer

Using the tool keyword at the top of your script lets it run in the editor. It should run those custom draw calls as well. Just be sure your script doesn't execute any game code.

by (94 points)
selected by
+1 vote

There is Performance.get_monitor(RENDER_DRAW_CALLS_IN_FRAME)
But this returns only 0 for 2d scene.

by (9,712 points)

Is there anything similar for the 2D engine?

Not that I know of.

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.