ScriptCreateDialog

Inherits: ConfirmationDialog < AcceptDialog < WindowDialog < Popup < Control < CanvasItem < Node < Object

The Editor’s popup dialog for creating new Script files.

Description

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 Popup.popup methods.

func _ready():
    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()

Properties

booldialog_hide_on_okO: false
floatmargin_bottomO: 232.0
floatmargin_rightO: 361.0
Vector2rect_sizeO: Vector2( 361, 232 )
Stringwindow_titleO: "Attach Node Script"

Methods

voidconfig ( String inherits, String path, bool built_in_enabled=true, bool load_enabled=true )

Signals

  • script_created ( Script script )

Emitted when the user clicks the OK button.

Method Descriptions

Prefills required fields to configure the ScriptCreateDialog for use.

Doc ID missing

Disclaimer: This page has been automaticaly and directly extracted from the official Godot Docs website, the 1970-01-01 at 00:00:00. It’s the English Stable version because it’s what most Godot users should use. The Copyright owners are Juan Linietsky, Ariel Manzur and the Godot community. CC-BY 3.0. Thanks for your patience and generosity.