Search Unity

  1. Unity 2019.1 beta is now available.
    Dismiss Notice
  2. We're excited to be bringing you the newest Unity features, news, demos, and we've even got some special guests from some of the industry’s most storied franchises. Set a reminder to tune in on YouTube here
    Dismiss Notice
  3. Unity 2018.3 is now released.
    Dismiss Notice

PSD Importer?

Discussion in '2D Experimental Preview' started by Aygtets, Dec 2, 2018.

  1. Aygtets

    Aygtets

    Joined:
    Dec 2, 2018
    Posts:
    2
    I was watching this Unity sponsored Brackeys tutorial -


    He uses an amazing PSDimporter package that isn't available in any beta I've downloaded. (And I've tried them all). I've looked everywhere, but I can't find it available anywhere.

    Was this removed from the current beta downloads?

    Is there anywhere I could get it?

    I've looked and looked and am finally posting here because I'm am super excited about this. It would increase my workflow tremendously!
     
    ina likes this.
  2. Aygtets

    Aygtets

    Joined:
    Dec 2, 2018
    Posts:
    2
    Oh. Perhaps this is all part of Phase 2, and the video creator somehow got access to packages not yet available to the public. There are various things he does in that video, that don't seem to work even in the Beta. I guess I'll wait!
     
  3. Guerro323

    Guerro323

    Joined:
    Sep 2, 2014
    Posts:
    11
  4. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    102
    Sorry for the delay, it's now available via Package Manager
     
    ina likes this.
  5. PandaMae

    PandaMae

    Joined:
    Jan 19, 2017
    Posts:
    2
    I can't seem to find the psd package via package manager. Do i need to install unity 2018.3? I'm currently using 2018.2.5f1. Thanks
     
  6. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    102
    Yes, 'its available only for 2018.3 and above.
     
  7. unity_IowUoVVq5jBGpQ

    unity_IowUoVVq5jBGpQ

    Joined:
    Jan 15, 2019
    Posts:
    1
    It doesn't seem to be working in 2018.3.1f1

    Getting errors after adding the package

    ERROR
    Library/PackageCache/com.unity.2d.psdimporter@1.0.0-preview.1/Editor/PSDImporter.cs(18,77): error CS0246: The type or namespace name `IAnimationAssetPostProcess' could not be found. Are you missing an assembly reference?

    UPDATE

    Errors have gone after updating the 2D Animation package.
     
    Nieder likes this.
  8. NikonPod

    NikonPod

    Joined:
    Apr 27, 2018
    Posts:
    2
    Im using Unity 2018.3.1 but cant import PSD. Also in "import settings" is no checkboxes like "character rig". This features not available for linux yet? I using Ubuntu 18.04.1. Tryed to use 2019 beta, same issue.
    Screenshots:

     
  9. LOGames

    LOGames

    Joined:
    Sep 4, 2016
    Posts:
    16
    @NikonPod
    You're probably trying to, logically, import a PSD file. If you save as a PSB (the photoshop large document format) you should get the options you're looking for. If you're saving from something that doesn't support PSB you can just rename your PSD to PSB.
     
  10. NikonPod

    NikonPod

    Joined:
    Apr 27, 2018
    Posts:
    2
    @LOGames Oh thanks a lot!!! Its works.
     
  11. Rohach

    Rohach

    Joined:
    Oct 26, 2016
    Posts:
    3
    Unity 2018.3.1: After the update [1.0.0-preview.2] 2019-01-25, the Character Rig broke on all 2D characters in prefabs. Windows 7 is installed. On Windows 10, everything is fine.
     
    Betzalel likes this.
  12. EvOne

    EvOne

    Joined:
    Jan 29, 2016
    Posts:
    20
    Hi !

    -Getting these errors just after installing last version PSD Importer:

    D:/AllUnity/!_Projects_u2018.3/PlayGround_tests02/Library/PackageCache/com.unity.2d.psdimporter@1.0.0-preview.2/Editor/PSDPlugin/PsdFile/Layers/Layer.cs(190,25): error CS1738: Named arguments must appear after the positional arguments

    D:/AllUnity/!_Projects_u2018.3/PlayGround_tests02/Library/PackageCache/com.unity.2d.psdimporter@1.0.0-preview.2/Editor/PSDPlugin/PsdFile/PsdFile.cs(426,25): error CS1738: Named arguments must appear after the positional arguments

    P.S. I'm found a similar case described in another topic:
    https://forum.unity.com/threads/2d-animation-preview-packages.521778/page-4#post-4175242

    P.P.S. After installing PSD Importer in new empty project - everything is ok, but in other cases:

    2019-02-05_08-37-47.png 2019-02-05_09-03-14.png
     

    Attached Files:

    Betzalel likes this.
  13. ratxrat

    ratxrat

    Joined:
    Nov 7, 2016
    Posts:
    19
    i Have some problem use UNITY 2018.3.4f1 , i just download ver preview 1 and all error gone. work test import psb file


     
    Last edited: Feb 5, 2019
    Nieder likes this.
  14. swpowe

    swpowe

    Joined:
    Mar 20, 2018
    Posts:
    3
    I'm in Unity 208.3.1 and I don't see any of the 2D packages. I'm specially looking for the PSD importer. Suggestions?
     
  15. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    729
    How buggy is the new psd importer package?
     
  16. unity_pcIwz4kigiaMOg

    unity_pcIwz4kigiaMOg

    Joined:
    Feb 9, 2019
    Posts:
    2
    Have you tried clicking "Advanced"?
     
  17. unity_pcIwz4kigiaMOg

    unity_pcIwz4kigiaMOg

    Joined:
    Feb 9, 2019
    Posts:
    2
    I have also received the "error CS1738: Named arguments must appear after the positional arguments" error when trying to import PSB file. Unity 2018.3.5f1, PSD importer 1.0.0.0 preview 2. Creating new project seem to have fixed this. But obviously something is broken.
     
    Betzalel and EvOne like this.
  18. Betzalel

    Betzalel

    Joined:
    Dec 3, 2017
    Posts:
    15
    Hi! was loving the psd (psb) importer! but after updating all my 2d characters are broken and getting the same error messages as others are reporting above! it looks as tho all the bones are no longer associated with their respective sprites and meshes... weird thing is that i dont see the sprite editor option anymore! just a very detailed and complex inspector (which by the way actually looks really cool like we will have lots of fine tuning options) but i cant figure out how to re associate all my bones with the sprites.... i did a dumb thing and didnt name them all very descriptively... since i was working visually and thinking i would rename them later...

    any word on what im missing or doing wrong to get back the psd sprite editor would help me immensely so i can repair the bone/sprite association and also ill post the errors here too just to emphasize the common issue i and the others seem to be facing.
    if just showing the error here isnt enough info to help fix let me know what else i should post or report.

    2018/Library/PackageCache/com.unity.2d.psdimporter@1.0.0-preview.2/Editor/PSDPlugin/PsdFile/PsdFile.cs(426,25): error CS1738: Named arguments must appear after the positional arguments

    NullReferenceException: Object reference not set to an instance of an object
    UnityEngine.Experimental.U2D.Animation.SpriteSkin.LateUpdate () (at Library/PackageCache/com.unity.2d.animation@2.0.0-preview.1/Runtime/SpriteSkin.cs:152)
     
    EvOne likes this.
  19. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    490
    Hi
    I use the psb importer with animation 2d and it works great.
    I only have a problem.
    I have set it in 2048 but it makes an atlas of 2048x4096.
    This results in the quality to be 1024 and not good.
    So if I want quality of 2048 I have to switch to 4096 max texture size. Its weird.

    If you are confused, I want to say that my psb would fit in an atlas of 2048x2048 (since I have set it in 2048 max textures) but it doesnt do it like this, it makes an atlas of 2048x4096. There is nothing in my psb that doesnt fit in 2048 either vertical of horizontal.
     
    Last edited: Feb 15, 2019
  20. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    102
    Will take a look and get back ASAP
     
  21. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    102
    The packing algorithm is not optimal at the moment and we will continue to improve on it. If you can share with us your image, we can use it as part of our test case to see pack it better
     
  22. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    490
    What is your email?
     
  23. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    102
    The issue is due to the project is using .NET 3.5. Switching it to .NET 4.0 should work. A fix for making the package compatible with .NET 3.5 is on the way
     
    EvOne likes this.
  24. EvOne

    EvOne

    Joined:
    Jan 29, 2016
    Posts:
    20
    Exactly! :) Thank You for this solution!
     
  25. Betzalel

    Betzalel

    Joined:
    Dec 3, 2017
    Posts:
    15
    worked!
    worked! thank you!
     
    EvOne likes this.
  26. EricProton

    EricProton

    Joined:
    Mar 29, 2018
    Posts:
    1
    This importer has the potential to hugely speed up my workflow! I was wondering if there's a way to import the sprites without the layers' alpha being cropped out. I need my sprites to all be the same size so their pivots line up. Alternatively, is there a way to have them cropped but have the pivot for each sprite placed at the psd's center?

    Thanks!
     
  27. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    102
    Sorry the update is taking longer than it suppose to. Just a note we haven't forget about it and we are still working on it.
     
    Circool likes this.
  28. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    490
    I have a very annoying bug. I have imported more than 40 PSBs.
    After updating to 2018.3.7 I have a very annoying bug:
    Every time I lose focus of Unity Window in Windows 10 64 bit and I regain focus (eg to use a calculator) it re imports No6.
    After it completes it loses focus and then each time I click Unity window it re-imports again stuck in an endless loop. I have to shut down unity to fix it. Then it lets me work for a while and then does the same. I tried re-importing this asset with no difference. This is really annoying.
     
  29. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    490
    Tried version 2018.3.8f1 with all the latest package manager updates but still it stucks in re-importing the PSB forever.
     
  30. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    490
    I found the cause of the bug:
    I had a photoshop layer named "horse" and then in the bones I named one bone "horse" resulting that the PSB had 2 objects with the same name "horse". This caused the reimporing loop forever even if you rename one of those in the Hierarchy. It fixes only if you go and rename the bone. Please verify.
     
    EvOne likes this.
  31. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    102
    Thanks for the report. We will look into it and have a fix as soon as we can
     
  32. Nullponullpo

    Nullponullpo

    Joined:
    Jun 22, 2017
    Posts:
    2
    Hi Leo.
    Thank you for providing great features.
    But I am facing a big problem.

    ArgumentOutOfRangeException: Length * sizeof(T) cannot exceed 2147483647 bytes
    Parameter name: length
    UnityEditor.Experimental.U2D.Common.ImagePacker.Pack (Unity.Collections.NativeArray`1[UnityEngine.Color32][] buffers, System.Int32 width, System.Int32 height, System.Int32 padding, Unity.Collections.NativeArray`1[UnityEngine.Color32]& outPackedBuffer, System.Int32& outPackedBufferWidth, System.Int32& outPackedBufferHeight, UnityEngine.RectInt[]& outPackedRect, UnityEngine.Vector2Int[]& outUVTransform) (at Library/PackageCache/com.unity.2d.common@1.0.11-preview.1/Editor/ImagePacker/ImagePacker.cs:74)
    UnityEditor.Experimental.U2D.PSD.PSDImporter.ImportFromLayers (UnityEditor.Experimental.AssetImporters.AssetImportContext ctx, PDNWrapper.Document doc) (at Packages/com.unity.2d.psdimporter@1.0.0-preview.2/Editor/PSDImporter.cs:1186)
    UnityEditor.Experimental.U2D.PSD.PSDImporter.OnImportAsset (UnityEditor.Experimental.AssetImporters.AssetImportContext ctx) (at Packages/com.unity.2d.psdimporter@1.0.0-preview.2/Editor/PSDImporter.cs:226)
    UnityEditor.Experimental.AssetImporters.ScriptedImporter.GenerateAssetData (UnityEditor.Experimental.AssetImporters.AssetImportContext ctx) (at C:/buildslave/unity/build/Modules/AssetPipelineEditor/Public/ScriptedImporter.cs:20)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    Files with large images and multiple layers can not be imported into Unity.

    So I changed the approach.
    The method was to convert PSDimporter and output all layers as a single texture. As a result, I was able to read the file, but a new problem occurred.

    When you open SpriteEditor, there is no file containing multiple textures, so only one image is displayed and SpriteEditor's window is broken. I want to borrow my wisdom because I am wondering how to make the change.
     
  33. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    102
    @Nullponullpo are you able to share the file with me for me to check what might be the issue? You can PM me with a link.
     
  34. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    490
    Now when I started Unity I got many of these errors:

    AssetImporter is referencing an asset from the previous import. This should not happen.

    And this info at the end:

    A default asset was created for 'Assets/Media/Graphics/PSB/new_style30.psb' because the asset importer crashed on it last time.
    You can select the asset and use the 'Assets -> Reimport' menu command to try importing it again, or you can replace the asset and it will auto import again.
     
  35. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    490
    I re-imported correctly and I got these info:
    Identifier uniqueness violation: 'number_GO/number_GO/lion'. Scripted Importers do not guarantee that subsequent imports of this asset will properly re-link to these targets.
    Identifier uniqueness violation: 'number_GO/number_GO/lion/Transform'. Scripted Importers do not guarantee that subsequent imports of this asset will properly re-link to these targets.

    I dont know what it means.
     
  36. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    490
    Maybe it has to do with my previously reported bug.
     
  37. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    102
    @giorgos_gs I wasn't able to reproduce the issue.
    Thanks, we will try to see if we can repro the issue. Which Unity version and pacakge are you on?
     
  38. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    490
    Both latest.