Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

PsdInvalidException: Unrecognized layer section type (PSD Importer, Error when importing PSB file)

Discussion in '2D' started by St3llarYT, Aug 19, 2021.

  1. St3llarYT

    St3llarYT

    Joined:
    May 19, 2020
    Posts:
    4
    Hello, i am trying to import a psb file of an Astronaut character so that i can animate it using the skeletal animation part of the 2D animation Package, here is a screenshot of the photoshop window:


    Imgur: The magic of the Internet

    but everytime i try and import the psb file into unity (2020.3.16f1 Personal), 2D PSD Importer (4.1.0) fails and throws up these 2 errors:

    PsdInvalidException: Unrecognized layer section type.
    PhotoshopFile.PsdFile.VerifyLayerSections () (at Library/PackageCache/com.unity.2d.psdimporter@4.1.0/Editor/PSDPlugin/PsdFile/PsdFile.cs:562)
    PaintDotNet.Data.PhotoshopFileType.PsdLoad.Load (System.IO.Stream input) (at Library/PackageCache/com.unity.2d.psdimporter@4.1.0/Editor/PSDPlugin/PhotoShopFileType/PsdLoad.cs:68)
    UnityEditor.U2D.PSD.PSDImporter.OnImportAsset (UnityEditor.AssetImporters.AssetImportContext ctx) (at Library/PackageCache/com.unity.2d.psdimporter@4.1.0/Editor/PSDImporter.cs:216)
    UnityEditor.AssetImporters.ScriptedImporter.GenerateAssetData (UnityEditor.AssetImporters.AssetImportContext ctx) (at <ef3b6bf002d8435a97b4e938f6c49b02>:0)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)

    Asset import failed, "Assets/Materials/Astronaut_Sprite.psb" > PsdInvalidException: Unrecognized layer section type.
    PhotoshopFile.PsdFile.VerifyLayerSections () (at Library/PackageCache/com.unity.2d.psdimporter@4.1.0/Editor/PSDPlugin/PsdFile/PsdFile.cs:562)
    PaintDotNet.Data.PhotoshopFileType.PsdLoad.Load (System.IO.Stream input) (at Library/PackageCache/com.unity.2d.psdimporter@4.1.0/Editor/PSDPlugin/PhotoShopFileType/PsdLoad.cs:68)
    UnityEditor.U2D.PSD.PSDImporter.OnImportAsset (UnityEditor.AssetImporters.AssetImportContext ctx) (at Library/PackageCache/com.unity.2d.psdimporter@4.1.0/Editor/PSDImporter.cs:216)
    UnityEditor.AssetImporters.ScriptedImporter.GenerateAssetData (UnityEditor.AssetImporters.AssetImportContext ctx) (at <ef3b6bf002d8435a97b4e938f6c49b02>:0)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)

    I simply cannot find a solution. Here is the psb file if you wish to try and reproduce the problem: https://www.mediafire.com/file/aymhra08722hliu/Astronaut_Sprite.psb/file
     
  2. Unrighteouss

    Unrighteouss

    Joined:
    Apr 24, 2018
    Posts:
    463
    Yep, your file doesn't work for me either. I don't know what the errors mean, but if you're not using any special layers or anything, this is most likely a bug. You should submit a bug report for it.

    I opened the file with Clip Studio Paint and re-saved it. It works now, but as with all files saved using CSP, there aren't any layer ID's, so it throws warnings saying that "LayerId is not unique. Mapping will be done by Layers name." - which isn't actually anything to worry about.

    Here's a working version of your file: https://drive.google.com/file/d/1R8U0UGB-jUS7QHKu51SrN6vgTxBex-X6/view?usp=sharing

    You can use this in the mean time if you like, but as I said earlier, you will receive a harmless warning for each layer.
     
  3. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    405
    Thanks for reporting. We will take a look at it
     
  4. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    405
    @St3llarYT Hi, what software did you used to create the art?