Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Builtin scripts do not respond to "tool" keyword #26178

Closed
xDGameStudios opened this issue Feb 23, 2019 · 1 comment
Closed

Builtin scripts do not respond to "tool" keyword #26178

xDGameStudios opened this issue Feb 23, 2019 · 1 comment

Comments

@xDGameStudios
Copy link
Contributor

Godot version:
Godot 3.1 Beta 5

OS/device including version:
OSX Mojave & Windows 10

Issue description:
Nodes with builtin scripts that inherit from other scripts don't respond to the "tool" keyword
for example:

#test.gd

tool
extends Node
class_name MyClass

func _init():
    print("init");

if you create a scene with this node every time you save/reload "init" gets printed to output.

#Node with builtin script inheriting MyClass

tool
extends MyClass

saving/reloading doesn't output anything.
even the code below doesn't work.

tool
extends Node

func _init():
	print("a");
@KoBeWi
Copy link
Member

KoBeWi commented Aug 7, 2020

So, this works, but you need to reload the script. For some reason this is sometimes difficult to do, because even if you close the scene, the script is cached somewhere and you have to reload project to make it update (this not always happens though). This is problematic, but the actual problem is more similar to #15406, so closing this.

@KoBeWi KoBeWi closed this as completed Aug 7, 2020
@KoBeWi KoBeWi added the archived label Aug 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants