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

Method set_path

modules/gdscript/gdscript.cpp:1091–1104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1089}
1090
1091void 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
1106String GDScript::get_script_path() const {
1107 if (!path_valid && !get_path().is_empty()) {

Callers 8

loadMethod · 0.45
get_shallow_scriptMethod · 0.45
test_compilerFunction · 0.45
test_directoryFunction · 0.45
init_autoloadsFunction · 0.45
execute_test_codeMethod · 0.45
_load_action_mapMethod · 0.45
main.cppFile · 0.45

Calls

no outgoing calls

Tested by 4

test_compilerFunction · 0.36
test_directoryFunction · 0.36
init_autoloadsFunction · 0.36
execute_test_codeMethod · 0.36