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()