From 80cb7d46e627594cdf3ded1d2deff6908317e137 Mon Sep 17 00:00:00 2001 From: MoeThun Date: Sun, 21 Jul 2024 21:39:36 +0800 Subject: [PATCH] Update ronstring_to_reflect_component.rs --- .../blenvy/src/components/ronstring_to_reflect_component.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/blenvy/src/components/ronstring_to_reflect_component.rs b/crates/blenvy/src/components/ronstring_to_reflect_component.rs index faf2cf7..08732c3 100644 --- a/crates/blenvy/src/components/ronstring_to_reflect_component.rs +++ b/crates/blenvy/src/components/ronstring_to_reflect_component.rs @@ -50,7 +50,7 @@ fn components_string_to_components( { debug!("TYPE INFO {:?}", type_registration.type_info()); - let ron_string = format!( + let mut ron_string = format!( "{{ \"{}\":{} }}", type_registration.type_info().type_path(), parsed_value @@ -67,6 +67,9 @@ fn components_string_to_components( */ debug!("component data ron string {}", ron_string); + if cfg!(windows) { + ron_string = ron_string.replace("\\", "/"); + } let mut deserializer = ron::Deserializer::from_str(ron_string.as_str()) .expect("deserialzer should have been generated from string"); let reflect_deserializer = ReflectDeserializer::new(type_registry);