fix: error during domain reload (#1077)

This commit is contained in:
bd_ 2024-09-01 18:59:44 -07:00 committed by GitHub
parent d33787a6b0
commit c309d93bdd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;