Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ParticleSystemPreview was not disposed properly. #9

Open
larssteenhoff opened this issue Jan 2, 2022 · 1 comment
Open

ParticleSystemPreview was not disposed properly. #9

larssteenhoff opened this issue Jan 2, 2022 · 1 comment

Comments

@larssteenhoff
Copy link

After switching to another particle there is this error:
Using unity 2022

ParticleSystemPreview was not disposed properly. Make sure that base.Cleanup is called if overriding the Cleanup method. If you are implementing this in an Editor or EditorWindow, don't forget to call ObjectPreview.Cleanup in OnDisable.
UnityEditor.ObjectPreview:Finalize () (at /Users/bokken/buildslave/unity/build/Editor/Mono/Inspector/Editor.cs:58)

@larssteenhoff
Copy link
Author

larssteenhoff commented Jan 2, 2022

Solution:

In ParticleSystemGameObjectEditor, you need to add

private void OnDisable()
{
  if (m_Preview != null)
     m_Preview .Cleanup();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant