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

Method get_open_scripts

editor/script/script_editor_plugin.cpp:3934–3950  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3932}
3933
3934Vector<Ref<Script>> ScriptEditor::get_open_scripts() const {
3935 Vector<Ref<Script>> out_scripts = Vector<Ref<Script>>();
3936
3937 for (int i = 0; i < tab_container->get_tab_count(); i++) {
3938 ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_tab_control(i));
3939 if (!se) {
3940 continue;
3941 }
3942
3943 Ref<Script> scr = se->get_edited_resource();
3944 if (scr.is_valid()) {
3945 out_scripts.push_back(scr);
3946 }
3947 }
3948
3949 return out_scripts;
3950}
3951
3952TypedArray<ScriptEditorBase> ScriptEditor::_get_open_script_editors() const {
3953 TypedArray<ScriptEditorBase> script_editors;

Callers 1

_should_reload_scriptMethod · 0.80

Calls 5

get_tab_controlMethod · 0.80
get_tab_countMethod · 0.45
get_edited_resourceMethod · 0.45
is_validMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected