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.
  2. We’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

2D psd importer cant be used in inspector, null reference

Discussion in '2D' started by ChrisRapczynski, Sep 10, 2022.

  1. ChrisRapczynski

    ChrisRapczynski

    Joined:
    Jan 13, 2020
    Posts:
    38
    upload_2022-9-10_7-19-45.png

    the null reference in platform settings makes it so I cant use this inspector at all. Im using psd importer 6.0.5 and unity 2021.3.9f1.
     
  2. ChrisRapczynski

    ChrisRapczynski

    Joined:
    Jan 13, 2020
    Posts:
    38
    just tried updating to a 2022 unity release, and it still had this issue
     
  3. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    10,215
    Sounds like you've got a corrupt project or maybe a corrupt Unity install. Tried removing the "Library" folder for the project and reloading it? Tried an empty new project?
     
  4. ChrisRapczynski

    ChrisRapczynski

    Joined:
    Jan 13, 2020
    Posts:
    38
    removing the library caused a memory error the first time I tried to open the copy of the project, but then it opened and still had the issue. So I made a new 2d project and just put in one of my psbs, and it still has this issue.
    Heres an image of the fresh project
    upload_2022-9-11_11-17-0.png
     
  5. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    10,215
    That's a good test if you've used a new project from scratch and it persists. Thanks for trying that.

    I'll pass this thread onto the 2D team so someone can perhaps comment tomorrow.
     
  6. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    10,215
    It might be that the PSD's ".meta" file is corrupted.

    For instance, it'll have a section (amongst others) like this:
    Code (CSharp):
    1. platformSettings:
    2.   - serializedVersion: 3
    3.     buildTarget: DefaultTexturePlatform
    4.     maxTextureSize: 1024
    5.     resizeAlgorithm: 0
    6.     textureFormat: -1
    7.     textureCompression: 1
    8.     compressionQuality: 50
    9.     crunchedCompression: 0
    10.     allowsAlphaSplitting: 0
    11.     overridden: 0
    12.     androidETC2FallbackOverride: 0
    13.     forceMaximumCompressionQuality_BC6H_BC7: 0
    14.   - serializedVersion: 3
    15.     buildTarget: Standalone
    16.     maxTextureSize: 2048
    17.     resizeAlgorithm: 0
    18.     textureFormat: -1
    19.     textureCompression: 1
    20.     compressionQuality: 50
    21.     crunchedCompression: 0
    22.     allowsAlphaSplitting: 0
    23.     overridden: 0
    24.     androidETC2FallbackOverride: 0
    25.     forceMaximumCompressionQuality_BC6H_BC7: 0
    Worst case is you can delete the existing ".metafile" and let Unity create another for you. Note that if it contains useful information for the importer then you should first make a copy of it outside the project.

    Also, this is a good time to use your source control to restore it to a previous known good point.
     
  7. ChrisRapczynski

    ChrisRapczynski

    Joined:
    Jan 13, 2020
    Posts:
    38
    I dont think thats the case because all the psbs in the project that used to work now have that problem, really seems like a problem with the package. The meta files look totally normal too. I create psbs by exporting psds as psds with gimp, and then changing the file type to psb. its possible this is the problem but this is how Ive always done it, and I cant really find a more straight forward way of doing it either. and it has to be psb for the spritesheet to import with layers correctly.
     
    Last edited: Sep 11, 2022
  8. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    875
    MelvMay likes this.
  9. ChrisRapczynski

    ChrisRapczynski

    Joined:
    Jan 13, 2020
    Posts:
    38
    Awesome to hear, thank you so much
     
    Ted_Wikman and MelvMay like this.
  10. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    10,215
  11. agassi415

    agassi415

    Joined:
    Jan 13, 2017
    Posts:
    3
    have the same issue with 2021.3.9f1 and importer 6.0.5
    and silimar issue with 2020.3.38f1 and importer 4.3.0
    but the same psb file is ok with 2019.4.40f1 and importer 2.1.11
    upload_2022-9-13_23-7-43.png
     
    Last edited: Sep 13, 2022
  12. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    10,215
  13. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    875
    FYI, yesterday we shipped PSD Importer 6.0.6, which fixes this issue for Unity 2021.3.
     
    ChrisRapczynski and MelvMay like this.
  14. DoubleDigitDev

    DoubleDigitDev

    Joined:
    Jan 17, 2022
    Posts:
    28
    I am experiencing the same issue. I am using version 2021.3.9. Is there some way to update my install? Thanks in advance

    Edit: I also updated the PSD importer to 6.0.6, but the error remains the same
     
  15. DoubleDigitDev

    DoubleDigitDev

    Joined:
    Jan 17, 2022
    Posts:
    28
    Problem resolved by restarting the editor, but more errors arose. Those problems are unrelated to this thread though.