You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
OpenXR: Fix saving action map when UID is used in project settings
This commit is contained in:
@@ -288,13 +288,12 @@ void OpenXRActionMapEditor::_load_action_map(const String p_path, bool p_create_
|
||||
} else if (p_create_new_if_missing) {
|
||||
action_map.instantiate();
|
||||
action_map->create_default_action_sets();
|
||||
action_map->set_path(p_path);
|
||||
|
||||
// Save it immediately
|
||||
err = ResourceSaver::save(action_map, p_path);
|
||||
if (err != OK) {
|
||||
// Show warning but continue.
|
||||
EditorNode::get_singleton()->show_warning(vformat(TTR("Error saving file %s: %s"), edited_path, error_names[err]));
|
||||
EditorNode::get_singleton()->show_warning(vformat(TTR("Error saving file %s: %s"), p_path, error_names[err]));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -495,5 +494,5 @@ OpenXRActionMapEditor::OpenXRActionMapEditor() {
|
||||
|
||||
// Our Action map editor is only shown if openxr is enabled in project settings
|
||||
// So load our action map and if it doesn't exist, create it right away.
|
||||
_load_action_map(GLOBAL_GET("xr/openxr/default_action_map"), true);
|
||||
_load_action_map(ResourceUID::ensure_path(GLOBAL_GET("xr/openxr/default_action_map")), true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user