Search Issue Tracker

Not Reproducible

Votes

0

Found in

5.0.0a3

Issue ID

598873

Regression

No

ArgumentException when trying to Reset texture import settings

Assets Management

-

Import any texture in Unity. Select it in the Project Browser. In the Inspector clcik on the Cogwheel icon and press Reset.

Result:
"ArgumentException: May only be called in OnPostProcessTexture
UnityEditor.TextureImporterInspector.SizeAndFormatGUI () (at C:/buildslave/unity/build/Editor/Mono/ImportSettings/TextureImporterInspector.cs:1815)
UnityEditor.TextureImporterInspector.OnInspectorGUI () (at C:/buildslave/unity/build/Editor/Mono/ImportSettings/TextureImporterInspector.cs:1275)
UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean forceDirty, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect, Boolean eyeDropperDirty) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1138)
UnityEditor.DockArea:OnGUI()
"

Reproduces with 4.3, 4.5, 4.6 and 5.0

Comments (6)

  1. Bralgs

    Feb 12, 2022 13:53

    Thanks @BURTONPOSEY, you saved me a lot of time and nerves

  2. shubhamswaraj2021

    Aug 20, 2020 01:54

    good one <a href="https://www.lyricsauto.com">lyricsauto</a>

  3. burtonposey

    May 14, 2019 13:46

    I had this error occur in 2018.3.10f1, but I was able to resolve my instance of this issue. In my case, it had to do with using git version control and the designation of EXR texture file extension as an LFS (large file storage) file after at least one of the two problem files was already added in the repository.

    If you're experiencing this issue and also using version control, firstly, do a check on your texture's file size. If it seems smaller, you likely have this issue. If that seems to be the case, then a valid solution is to remove the problem files from version control (backup the meta data for the files), re-add them from source versions of the files. The files that were in my project were not valid (e.g. my 20MB EXR file had become 161KB in my project), so I had to re-add them. Using the same meta files helped maintain asset guid references in my project.

    Hope this helps.

  4. vivekchakraverty

    Jan 30, 2017 16:34

    I have the same issue for a texture map for my 3D Model:(5.5.1f1)
    ArgumentException: May only be called in OnPostProcessTexture
    UnityEditor.Modules.DefaultTextureImportSettingsExtension.ShowImportSettings (UnityEditor.Editor baseEditor, UnityEditor.TextureImportPlatformSettings platformSettings) (at C:/buildslave/unity/build/Editor/Mono/Modules/DefaultTextureImportSettingsExtension.cs:93)
    UnityEditor.TextureImporterInspector.ShowPlatformSpecificSettings () (at C:/buildslave/unity/build/Editor/Mono/ImportSettings/TextureImporterInspector.cs:1464)
    UnityEditor.TextureImporterInspector.OnInspectorGUI () (at C:/buildslave/unity/build/Editor/Mono/ImportSettings/TextureImporterInspector.cs:1305)
    UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1227)
    UnityEditor.DockArea:OnGUI()

  5. Rarzax

    Dec 22, 2016 19:48

    When Import HeightMaps.png

    AumentException: May only be called in OnPostProcessTexture
    UnityEditor.Modules.DefaultTextureImportSettingsExtension.ShowImportSettings (UnityEditor.Editor baseEditor, UnityEditor.TextureImportPlatformSettings platformSettings) (at C:/buildslave/unity/build/Editor/Mono/Modules/DefaultTextureImportSettingsExtension.cs:60)
    UnityEditor.TextureImporterInspector.ShowPlatformSpecificSettings () (at C:/buildslave/unity/build/Editor/Mono/ImportSettings/TextureImporterInspector.cs:1470)
    UnityEditor.TextureImporterInspector.OnInspectorGUI () (at C:/buildslave/unity/build/Editor/Mono/ImportSettings/TextureImporterInspector.cs:891)
    UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1235)
    UnityEditor.DockArea:OnGUI()

  6. ianmcmillian

    Aug 18, 2016 11:01

    I have the same issue.
    Unity 5.4.0f3.

    Importing a set of textures in PNG format for PBR material.
    AO and Height image are affected.

    ArgumentException: May only be called in OnPostProcessTexture
    UnityEditor.Modules.DefaultTextureImportSettingsExtension.ShowImportSettings (UnityEditor.Editor baseEditor, UnityEditor.TextureImportPlatformSettings platformSettings) (at C:/buildslave/unity/build/Editor/Mono/Modules/DefaultTextureImportSettingsExtension.cs:60)
    UnityEditor.TextureImporterInspector.ShowPlatformSpecificSettings () (at C:/buildslave/unity/build/Editor/Mono/ImportSettings/TextureImporterInspector.cs:1470)
    UnityEditor.TextureImporterInspector.OnInspectorGUI () (at C:/buildslave/unity/build/Editor/Mono/ImportSettings/TextureImporterInspector.cs:891)
    UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1235)
    UnityEditor.DockArea:OnGUI()

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.