MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / reload

Method reload

editor/script/script_text_editor.cpp:2124–2134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2122}
2123
2124void ScriptTextEditor::reload(bool p_soft) {
2125 CodeEdit *te = code_editor->get_text_editor();
2126 Ref<Script> scr = script;
2127 if (scr.is_null()) {
2128 return;
2129 }
2130 scr->set_source_code(te->get_text());
2131 bool soft = p_soft || ClassDB::is_parent_class(scr->get_instance_base_type(), "EditorPlugin"); // Always soft-reload editor plugins.
2132
2133 scr->get_language()->reload_tool_script(scr, soft);
2134}
2135
2136PackedInt32Array ScriptTextEditor::get_breakpoints() {
2137 return code_editor->get_text_editor()->get_breakpointed_lines();

Callers 5

_update_method_treeMethod · 0.45
_create_newMethod · 0.45
_menu_optionMethod · 0.45
_reload_scriptsMethod · 0.45

Calls 7

get_text_editorMethod · 0.80
is_nullMethod · 0.45
set_source_codeMethod · 0.45
get_textMethod · 0.45
reload_tool_scriptMethod · 0.45
get_languageMethod · 0.45

Tested by

no test coverage detected