Skip to content

Commit

Permalink
remove all ui nodes before deserialization
Browse files Browse the repository at this point in the history
  • Loading branch information
mrDIMAS committed May 19, 2024
1 parent a2f7f23 commit c1084ac
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fyrox-ui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,12 @@ impl Visit for UserInterface {
fn visit(&mut self, name: &str, visitor: &mut Visitor) -> VisitResult {
let mut region = visitor.enter_region(name)?;

if region.is_reading() {
self.nodes.clear();
self.root_canvas = Handle::NONE;
self.methods_registry = Default::default();
}

self.screen_size.visit("ScreenSize", &mut region)?;
self.nodes.visit("Nodes", &mut region)?;
self.visual_debug.visit("VisualDebug", &mut region)?;
Expand Down

0 comments on commit c1084ac

Please sign in to comment.