| 1089 | } |
| 1090 | |
| 1091 | void GDScript::set_path(const String &p_path, bool p_take_over) { |
| 1092 | if (is_root_script()) { |
| 1093 | Script::set_path(p_path, p_take_over); |
| 1094 | } |
| 1095 | |
| 1096 | String old_path = path; |
| 1097 | path = p_path; |
| 1098 | path_valid = true; |
| 1099 | GDScriptCache::move_script(old_path, p_path); |
| 1100 | |
| 1101 | for (KeyValue<StringName, Ref<GDScript>> &kv : subclasses) { |
| 1102 | kv.value->set_path(p_path, p_take_over); |
| 1103 | } |
| 1104 | } |
| 1105 | |
| 1106 | String GDScript::get_script_path() const { |
| 1107 | if (!path_valid && !get_path().is_empty()) { |
no outgoing calls