Search Unity

Unity creates corrupt .psd duplicates when developing across Windows / macOS with Perforce

Discussion in 'Editor & General Support' started by JonathanBurroughs, Oct 23, 2017.

  1. JonathanBurroughs

    JonathanBurroughs

    Joined:
    Jan 22, 2014
    Posts:
    16
    We're encountering a strange bug when using .psd files and Perforce when developing in Unity.

    Our team develops on a mixture of Windows and macOS. Our 3D artist is a macOS user and imports his textures into Unity as .psd files. He then checks his work into Perforce, which I download on my Windows PC.

    When I open the Unity project after a check in of new .psd files, I find Unity creates duplicate files with the same names as the .psd files, each one prefaced by a % symbol. The files have a .psd file extension, but appear as blank white icons in the Unity project. When I attempt to open one of the .psd files in Photoshop, I receive an error telling me it isn't a valid Photoshop file.

    Unity also generates an error for each corrupt file instance: "Could not create texture from [assert address]: File could not be read".

    These corrupt .psd duplicates do not appear for the 3D artist using macOS. They only appear for Windows users when receiving the .psd files via Perforce - if the file is received by other means, such as sent over Slack, and then imported into Unity manually by a Windows user, the corrupt duplicate file does not appear.

    Is this a known issue? Is there a workaround? It's a very strange and confusing problem!

    Kind regards,

    Jonathan