mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Merge pull request #113580 from HolonProduction/path-fixup
Correctly set GDScript internal path for shallow scripts
This commit is contained in:
commit
94eeedd4d6
2 changed files with 8 additions and 1 deletions
|
|
@ -1078,6 +1078,13 @@ void GDScript::set_path_cache(const String &p_path) {
|
||||||
if (is_root_script()) {
|
if (is_root_script()) {
|
||||||
Script::set_path_cache(p_path);
|
Script::set_path_cache(p_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
path = p_path;
|
||||||
|
path_valid = true;
|
||||||
|
|
||||||
|
for (KeyValue<StringName, Ref<GDScript>> &kv : subclasses) {
|
||||||
|
kv.value->set_path_cache(p_path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GDScript::set_path(const String &p_path, bool p_take_over) {
|
void GDScript::set_path(const String &p_path, bool p_take_over) {
|
||||||
|
|
|
||||||
|
|
@ -153,7 +153,7 @@ thread_local SafeBinaryMutex<GDScriptCache::BINARY_MUTEX_TAG>::TLSData SafeBinar
|
||||||
SafeBinaryMutex<GDScriptCache::BINARY_MUTEX_TAG> GDScriptCache::mutex;
|
SafeBinaryMutex<GDScriptCache::BINARY_MUTEX_TAG> GDScriptCache::mutex;
|
||||||
|
|
||||||
void GDScriptCache::move_script(const String &p_from, const String &p_to) {
|
void GDScriptCache::move_script(const String &p_from, const String &p_to) {
|
||||||
if (singleton == nullptr || p_from == p_to) {
|
if (singleton == nullptr || p_from == p_to || p_from.is_empty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue