Does the editor provide a means of temporarily disabling a script?

5 days later

The editor does not provide a means to disable scripts, you can get around it with something like this though (untested, but should work. I’ll check later once I’m able to):

` extends Node export (bool) enabled = true setget set_enabled func _ready():

I’m not sure if this is needed or not.

set_enabled(enabled) func set_enabled(new_value): enabled = new_value

Then you just enable/disable whatever you need, example below

if enabled == true: set_process(true) set_physics_process(true) else: set_process(false) set_physics_process(false) `

I'm just looking for a way to quickly turn off a script in the editor. One simple click and the node that said script is attached to is still active and rendering but the script itself does not execute.

Other engines typically offer this as a way to quickly see if a script is causing an observed behavior or misbehavior.

You are talking about something similar to what Unity3D does with it's "Active" boolean, right?

Maybe put return right at the beginning of your function(s) that you to not be executed and see if that works? You could combine it with the above like this:

extends Node export (bool) var enabled = true func _ready(): if enabled == false: return "Other code here" func _process(delta): if enabled == false: return "Other code here" "Add the same two lines all of the other functions you want to disable"

Other than that I'm not sure there is a way to disable a script without clearing/removing the script from the node (though I could be wrong)

Yeah, I was hoping for something in the Editor UI. I'm pretty fast at commenting out code, so I can achieve it that way. But nowhere near as fast as a simple Unity-esque checkbox click. ;-)

How about making a feature proposal on the github issue tracker. Explain in detail how you think it should work and why it would be useful(although in this case that is rather obvious).

9 days later

You can comment out a chunk of code quickly by highlighting multiple lines and pressing Command K (on Macintosh). This toggles the comments on and off, effectively turning the code on and off.

5 years later