Skip to content

Tool script does not run until the scene is reloaded #25275

@Zylann

Description

@Zylann

Godot 3.0.6
Godot 3.1 beta 2

I made a simple tool script which uses _draw() to have custom visuals. But I noticed that once I finished writing it and setting it up, it was still not running in the scene. Only saving, closing and re-opening the scene made it run.
The same happens if you add a tool script to a node, this script won't run until you reload the scene, even if existing instances of it are running already.

Reproduction project:
ToolScriptDoesntRunYet.zip

  1. Open the project, see the main scene has one working node with custom tool draw (using custom.gd)
  2. Create another Node2D
  3. Put another custom.gd script on it: notice it doesn't work
  4. Save the scene, close it, and reopen it: notice it works now

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions