Search Issue Tracker


Fixed in 2021.1.X



Found in



Issue ID




Properties of an image can't be modified if changes are applied through popups

Asset - Importers


Image's properties etc can't be changed from 'Unapplied Settings" popup

Steps To Reproduce:

1. Create a new project
2. Drag any Image in the project window
3. Select the Image to view it in Inspector
4. Inspector > Texture Type> Sprite(2D and UI)
5. Click in the project window and let the popup appear
6. Click Apply

Expected Results: Image doesn't get converted into a sprite

Observed result: Invalid cast exception is thrown and the image is not converted into a sprite

Reproducible In: 2021.1.0a10
Not Reproducible In: 2021.1.0a8

Environment: Occurs only on Mac

Workaround: Apply the changes from the Inspector

Stack trace: InvalidCastException: Specified cast is not valid.
UnityEditor.TextureImporterInspector.get_textureInspector () (at /Users/bokken/buildslave/unity/build/Editor/Mono/ImportSettings/TextureImporterInspector.cs:119)
UnityEditor.TextureImporterInspector.RefreshPreviewChannelSelection () (at /Users/bokken/buildslave/unity/build/Editor/Mono/ImportSettings/TextureImporterInspector.cs:1614)
UnityEditor.TextureImporterInspector.Apply () (at /Users/bokken/buildslave/unity/build/Editor/Mono/ImportSettings/TextureImporterInspector.cs:1597)
UnityEditor.AssetImporters.AssetImporterEditor.ShowUnappliedAssetsPopup (System.Collections.Generic.List`1[T] assetPaths) (at /Users/bokken/buildslave/unity/build/Modules/AssetPipelineEditor/ImportSettings/AssetImporterEditor.cs:690)
UnityEditor.AssetImporters.AssetImporterEditor.CheckForApplyOnClose (System.Boolean isQuitting) (at /Users/bokken/buildslave/unity/build/Modules/AssetPipelineEditor/ImportSettings/AssetImporterEditor.cs:673)
UnityEditor.AssetImporters.AssetImporterEditor.OnDisable () (at /Users/bokken/buildslave/unity/build/Modules/AssetPipelineEditor/ImportSettings/AssetImporterEditor.cs:576)
UnityEditor.TextureImporterInspector.OnDisable () (at /Users/bokken/buildslave/unity/build/Editor/Mono/ImportSettings/TextureImporterInspector.cs:99)

Comments (3)

  1. tatoforever

    May 20, 2021 03:11

    This bug is also in 2020.3.8f1. When selecting textures the console spit InvalidCastException: Specified cast is not valid...

  2. wheee09

    May 16, 2021 02:20

    Ugh. Figured it out and not surprisingly it was due to the "Substance in Unity" Plugin. Have had numerous issues with this plugin breaking the editor.

    Both plugin versions 2.4.5 and 2.5.4 cause this issue.

  3. wheee09

    May 16, 2021 01:43

    Still getting this issue in 2021.1.6 and 2021.1.7. Weirdly enough, it doesn't happen on a brand new URP project.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.