Skip to content

Commit 43b39cf

Browse files
committed
Create new dictionary when updating openxr runtime paths
1 parent 3bf9dd0 commit 43b39cf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

toolkit/src/main/cpp/editor/meta_xr_simulator_dialog.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,10 @@ void MetaXRSimulatorDialog::_set_simulator_path(const String &p_path) {
156156
runtime_paths = editor_settings->get_setting(OPENXR_RUNTIME_PATHS_SETTING);
157157
}
158158

159-
runtime_paths[META_SIMULATOR_RUNTIME_NAME] = p_path;
160-
editor_settings->set_setting(OPENXR_RUNTIME_PATHS_SETTING, runtime_paths);
159+
Dictionary new_runtime_paths;
160+
new_runtime_paths.merge(runtime_paths);
161+
new_runtime_paths[META_SIMULATOR_RUNTIME_NAME] = p_path;
162+
editor_settings->set_setting(OPENXR_RUNTIME_PATHS_SETTING, new_runtime_paths);
161163
}
162164

163165
MetaXRSimulatorDialog::MetaXRSimulatorDialog() {

0 commit comments

Comments
 (0)