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

Method _editor_init_callback

modules/mono/csharp_script.cpp:1083–1102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1081
1082#ifdef TOOLS_ENABLED
1083void CSharpLanguage::_editor_init_callback() {
1084 // Load GodotTools and initialize GodotSharpEditor
1085
1086 int32_t interop_funcs_size = 0;
1087 const void **interop_funcs = godotsharp::get_editor_interop_funcs(interop_funcs_size);
1088
1089 Object *editor_plugin_obj = GDMono::get_singleton()->get_plugin_callbacks().LoadToolsAssemblyCallback(
1090 GodotSharpDirs::get_data_editor_tools_dir().path_join("RedotTools.dll").utf16().get_data(),
1091 interop_funcs, interop_funcs_size);
1092 CRASH_COND(editor_plugin_obj == nullptr);
1093
1094 EditorPlugin *godotsharp_editor = Object::cast_to<EditorPlugin>(editor_plugin_obj);
1095 CRASH_COND(godotsharp_editor == nullptr);
1096
1097 // Add plugin to EditorNode and enable it
1098 EditorNode::add_editor_plugin(godotsharp_editor);
1099 godotsharp_editor->enable_plugin();
1100
1101 get_singleton()->godotsharp_editor = godotsharp_editor;
1102}
1103#endif
1104
1105void CSharpLanguage::set_language_index(int p_idx) {

Callers

nothing calls this directly

Calls 5

path_joinMethod · 0.80
enable_pluginMethod · 0.80
get_dataMethod · 0.45
utf16Method · 0.45

Tested by

no test coverage detected