diff --git a/CHANGELOG.md b/CHANGELOG.md index 22446ed..17b8433 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#399] Fix: Parameter introspection did not skip EditorOnly objects - [#397] Fix: issues where `ComputeContext` flushes might not be processed at all - [#398] Fix: NullReferenceError in `GetParameterRemappingsAt` +- [#400] Fix: Spurious complaints about not being on the main thread in OnPreCull ### Changed diff --git a/Editor/PreviewSystem/ProxyManager.cs b/Editor/PreviewSystem/ProxyManager.cs index 7e6a622..9687684 100644 --- a/Editor/PreviewSystem/ProxyManager.cs +++ b/Editor/PreviewSystem/ProxyManager.cs @@ -17,10 +17,13 @@ internal static class ProxyManager [InitializeOnLoadMethod] private static void Initialize() { - Camera.onPreCull += OnPreCull; - Camera.onPostRender += OnPostRender; - EditorSceneManager.sceneSaving += (_, _) => ResetStates(); - AssemblyReloadEvents.beforeAssemblyReload += ResetStates; + EditorApplication.delayCall += () => + { + Camera.onPreCull += OnPreCull; + Camera.onPostRender += OnPostRender; + EditorSceneManager.sceneSaving += (_, _) => ResetStates(); + AssemblyReloadEvents.beforeAssemblyReload += ResetStates; + }; } private static List<(Renderer, bool)> _resetActions = new();