Table of Contents

Class ScriptCreateDialog

Godot editor's popup dialog for creating new Script files.

Inheritance
ScriptCreateDialog

Remarks

The ScriptCreateDialog creates script files according to a given template for a given scripting language. The standard use is to configure its fields prior to calling one of the Window.popup methods.

func _ready():
    var dialog = ScriptCreateDialog.new();
    dialog.config("Node", "res://new_node.gd") # For in-engine types.
    dialog.config("\"res://base_node.gd\"", "res://derived_node.gd") # For script types.
    dialog.popup_centered()

Methods

config(String, String, bool, bool)

Prefills required fields to configure the ScriptCreateDialog for use.

void config(String inherits, String path, bool built_in_enabled, bool load_enabled)

Parameters

inherits String
path String
built_in_enabled bool
load_enabled bool

Events

script_created(Script)

Emitted when the user clicks the OK button.

signal script_created(Script script)

Parameters

script Script