summaryrefslogtreecommitdiffstats
path: root/editor/script_editor_debugger.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-09-20 14:45:21 +0200
committerGitHub <noreply@github.com>2018-09-20 14:45:21 +0200
commitc19dc39630f16ec699be89b0fd39ed64c71fd08d (patch)
tree83cb0e15f65bbfb370ccd8d71cdea0e3a84658d6 /editor/script_editor_debugger.cpp
parent7235f48690b67c7e67814137685fbb9c60b13643 (diff)
parent54286e1711ba08a474a18a3febfbbe3c880d23e3 (diff)
downloadredot-engine-c19dc39630f16ec699be89b0fd39ed64c71fd08d.tar.gz
Merge pull request #22201 from DualMatrix/error_spam_2_electric_boogaloo
Fixed error spam in remote debugger
Diffstat (limited to 'editor/script_editor_debugger.cpp')
-rw-r--r--editor/script_editor_debugger.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp
index b32120dea5..cc477314e9 100644
--- a/editor/script_editor_debugger.cpp
+++ b/editor/script_editor_debugger.cpp
@@ -492,17 +492,19 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da
pinfo.usage = PropertyUsageFlags(int(prop[4]));
Variant var = prop[5];
- String hint_string = pinfo.hint_string;
- if (hint_string.begins_with("RES:") && hint_string != "RES:") {
- String path = hint_string.substr(4, hint_string.length());
- var = ResourceLoader::load(path);
- }
-
if (is_new_object) {
//don't update.. it's the same, instead refresh
debugObj->prop_list.push_back(pinfo);
}
+ if (var.get_type() == Variant::STRING) {
+ String str = var;
+ var = str.substr(4, str.length());
+
+ if (str.begins_with("PATH"))
+ var = ResourceLoader::load(var);
+ }
+
debugObj->prop_values[pinfo.name] = var;
}