Steps to reproduce:
- Open any Project with the 2D PSD Importer package installed (this enables a dropdown menu to switch to something in the Texture Importer)
- Import the attached PSD file
- Select it in the Project Browser
- In the Inspector switch the Importer type from Texture to PSD at the top of the Inspector
- In the Inspector click the kebab menu icon in the top right corner (⋮) and select "Properties..."
- In the newly opened Focused Inspector switch the Importer type at the top of the Inspector from PSD to Texture
Actual results: Errors "MissingReferenceException: The object of type 'UnityEditor.TextureImporter' has been destroyed but you are still trying to access it." & "The previous instance of UnityEditor.TextureImporterInspector has not been disposed correctly. Make sure you are calling base.OnDisable() in your AssetImporterEditor implementation." are logged when switching Importers and a focused Inspector is open
Expected results: Asset Importer is disposed properly and no Error is logged
Reproducible with versions: 2023.1.0a1, 6000.0.64f1, 6000.2.15f1, 6000.3.4f1, 6000.4.0b4, 6000.5.0a4
Tested on (OS): Windows 11