Skip to content

Commit 7271709

Browse files
committed
Merge pull request #105624 from dsnopek/openxr-action-map-uid-error
OpenXR: Fix saving action map when UID is used in project settings
2 parents 1f7a8ea + 217333e commit 7271709

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

modules/openxr/editor/openxr_action_map_editor.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,13 +288,12 @@ void OpenXRActionMapEditor::_load_action_map(const String p_path, bool p_create_
288288
} else if (p_create_new_if_missing) {
289289
action_map.instantiate();
290290
action_map->create_default_action_sets();
291-
action_map->set_path(p_path);
292291

293292
// Save it immediately
294293
err = ResourceSaver::save(action_map, p_path);
295294
if (err != OK) {
296295
// Show warning but continue.
297-
EditorNode::get_singleton()->show_warning(vformat(TTR("Error saving file %s: %s"), edited_path, error_names[err]));
296+
EditorNode::get_singleton()->show_warning(vformat(TTR("Error saving file %s: %s"), p_path, error_names[err]));
298297
}
299298
}
300299

@@ -495,5 +494,5 @@ OpenXRActionMapEditor::OpenXRActionMapEditor() {
495494

496495
// Our Action map editor is only shown if openxr is enabled in project settings
497496
// So load our action map and if it doesn't exist, create it right away.
498-
_load_action_map(GLOBAL_GET("xr/openxr/default_action_map"), true);
497+
_load_action_map(ResourceUID::ensure_path(GLOBAL_GET("xr/openxr/default_action_map")), true);
499498
}

0 commit comments

Comments
 (0)