From c309d93bddc348cf85309b251e0fc31d39580bc7 Mon Sep 17 00:00:00 2001 From: bd_ Date: Sun, 1 Sep 2024 18:59:44 -0700 Subject: [PATCH] fix: error during domain reload (#1077) --- Editor/ReactiveObjects/Simulator/ROSimulator.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Editor/ReactiveObjects/Simulator/ROSimulator.cs b/Editor/ReactiveObjects/Simulator/ROSimulator.cs index 59819dae..2feccc63 100644 --- a/Editor/ReactiveObjects/Simulator/ROSimulator.cs +++ b/Editor/ReactiveObjects/Simulator/ROSimulator.cs @@ -74,7 +74,12 @@ namespace nadena.dev.modular_avatar.core.editor.Simulator Selection.selectionChanged -= SelectionChanged; is_enabled = false; - PropertyOverrides.Value = null; + // Delay this to ensure that we don't try to change this value from within assembly reload callbacks + // (which generates a noisy exception) + EditorApplication.delayCall += () => + { + PropertyOverrides.Value = null; + }; } private ComputeContext _lastComputeContext;