0 votes

editor

So i testing my map generator in the editor using the tool keyword for fast test results instead of restarting the game and mess. but godot draws the image on the editor too, this is annoying.

Is it a bug / can i avoid this?

(godot 3.1.2 stable)

asked Jan 31 in Engine by AiTechEye (99 points)

Oops, very rare, draw 2 times, once on the editor's screen and once on the editor's menu. Are you drawing in the function _draw () or its signal draw? Does the script inherit from node2D or similar? It seems as if you want to make a custom panel to the editor. These days the stable version 3.2 of godot came out, download it and try if the same thing happens.

Also below in Output there is a red dot that indicates that you have an error, verify it.

I created a new project in 3.2, made a Node2D & script, added the scene to autoload.

tool
extends Node2D

func _draw():
    draw_rect(Rect2(Vector2(1,1),Vector2(100,100)),Color(0,1,0),true)

still happens, seems like autoload is causing it

Please log in or register to answer this question.

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.