Support script global resource name in EditorFileSystem

* Works for binary and text files.
* Makes EditorQuickOpen work with custom resources again.
* Information is cached and easily accessible.

Properly fixes #66179. Supersedes #66215 and supersedes #62417

**WARNING**: This required breaking backwards binary compatibility (.res and .scn files). Files saved after this PR is merged will no longer open in any earlier versions of Godot.
This commit is contained in:
Juan Linietsky 2023-01-19 19:12:25 +01:00
parent 14fdd28de9
commit dddd8d43f6
17 changed files with 250 additions and 18 deletions

View file

@ -248,6 +248,10 @@ Ref<Script> GDScript::get_base_script() const {
}
}
StringName GDScript::get_global_name() const {
return name;
}
StringName GDScript::get_instance_base_type() const {
if (native.is_valid()) {
return native->get_name();