ScriptEditor

Inherits: PanelContainer < Container < Control < CanvasItem < Node < Object

El editor de script de Godot.

Descripción

Nota: Esta clase no debe ser instanciada directamente. En su lugar, accede al singleton usando EditorInterface.get_script_editor.

Métodos

bool

can_drop_data_fw ( Vector2 point, Variant data, Control from ) const

void

drop_data_fw ( Vector2 point, Variant data, Control from )

Script

get_current_script ( )

Variant

get_drag_data_fw ( Vector2 point, Control from )

Array

get_open_scripts ( ) const

void

goto_line ( int line_number )

void

open_script_create_dialog ( String base_name, String base_path )

Señales

  • editor_script_changed ( Script script )

Emitido cuando el usuario cambió el script activo. El argumento es un Script recién activado.


  • script_close ( Script script )

Emitido cuando el editor está a punto de cerrar el script activo. El argumento es un Script que va a ser cerrado.

Descripciones de Métodos



  • Script get_current_script ( )

Devuelve un Script que está actualmente activo en el editor.



  • Array get_open_scripts ( ) const

Devuelve un array con todos los objetos Script que están actualmente abiertos en el editor.


  • void goto_line ( int line_number )

Va a la línea especificada en el script actual.


  • void open_script_create_dialog ( String base_name, String base_path )

Opens the script create dialog. The script will extend base_name. The file extension can be omitted from base_path. It will be added based on the selected scripting language.