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.

Official 2D PSD Importer 7.0 released for Unity 2022.1

Discussion in '2D' started by rustum, Aug 26, 2022.

  1. Upp000

    Upp000

    Joined:
    Mar 4, 2021
    Posts:
    84
    I do appreciate the performance improve if there is any. So I would love to keep up to date.
    I don't want to sound harsh.
    But 6.0.5 is a disaster. I can't imagine how they can release it. It obviously doesn't work. The sprite editor doesn't open.
    Maybe they released it under some kind of pressure. But it is better to not release than to release a version that has obvious critical bug.
     
    Last edited: Nov 22, 2022
  2. Upp000

    Upp000

    Joined:
    Mar 4, 2021
    Posts:
    84
    I hope they don't consider the mechanism that causes my rig to change a new norm. I know it would work in new rig. But I think even new rig wouldn't work if the artist wants to modify or replace the psb file. Artists always want to modify their art.
    For example, if the artist wants to remove the horns from the character's helmet. He erases it in ps and then replace the psb file. Wouldn't the layout in the psd importer change and destroy the rig?
    It works fine in 6.0.4
     
    Last edited: Nov 22, 2022
  3. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    848
    Hello!
    We have received a bug report regarding the faulty positioning of the layers and are taking a look at it. Sorry for the inconvenience caused.
    As always, please file bug reports for your specific issue, as it might be a similar issue and not the same issue that has already been reported.
     
  4. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    848
    It seems like the reason for the misplaced Sprites/GameObjects some of you are experiencing is due to photoshop layers being larger than the documents canvas size. If you would like to resolve this issue locally, you can crop the layers inside of Photoshop (Shortcut key C in Photoshop while having layer(s) selected), save the changes and bring the file into Unity.

    We are working on a fix to support these layers in the upcoming versions of PSD Importer.
     
  5. Upp000

    Upp000

    Joined:
    Mar 4, 2021
    Posts:
    84
    Thanks for your hard work.
    There is one simple test you can try out.
    Draw a simple shape like this, each color is a separate layer.
    000007.png

    Import it to unity and look at the skinning editor.

    000009.png
    Extend the yellow line.

    000010.png
    Replace the psb file. And look at the skinning editor.

    000011.png

    Instead of hiding the extended part, the geometry has moved. I think the same would happen if you erase part of the line instead of extending it. The point is, artists always want to modify their art. And making things longer or shorter shouldn't move the geometry in skinning editor.
    And also make sure the geometry wouldn't move if you remove or add layers in the ps.
     
    Last edited: Nov 24, 2022
    Ted_Wikman likes this.
  6. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    848
    Thanks @Upp000. There seems to be two issues currently active:
    1. If layers are extending past the canvas of the .psd/.psb file, the position of the Sprite will be wrong in the Skinning Editor and in the generated Prefab. This issue will happen on every import of the file, and does not require modification of the .psd/.psb for the issue to take place.
    2. If a layer is modified (extending/shrinking the content of the layer), the position and size of the Sprite will be wrong in the Skinning Editor and in the generated Prefab. This issue will only happen when a .psd/.psb has its layers modified.

    For issue no. 1, cropping the layer to the size of the canvas will resolve the issue. Do note that we are working on a fix to restore this functionality. Also, make sure to back your art up before cropping, so that you can easily restore the content.

    For issue no. 2, we currently do not have a bug report for this issue. @Upp000, if you have the time, please file a report for it, so that we can take a closer look.

    If there are more issues than the two I've outlined above, please let me know, so that we can fix them as well.
    Thank you all for the help and patience!
     
  7. Upp000

    Upp000

    Joined:
    Mar 4, 2021
    Posts:
    84
    Sorry I don't have the time, but I think you already clearly understand the issue.
    The point is, the current state of psd importer is too delicate, you need to make sure it can handle all situations.
    You should have a tester in your team to do all kinds of stress testing. Or you can do it yourself like me, I always stress test my game.
     
    Last edited: Nov 24, 2022
  8. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    848
    The reason why we ask for developers to submit bug reports is not that we do not have QA staff, but so that we can get additional insight into that developer's setup, which provides a lot of useful information that helps solving bugs in a more holistic way.

    No worries that you do not have time, we will try to reproduce this issue on our end. Thank you for making us aware.
     
  9. altepTest

    altepTest

    Joined:
    Jul 5, 2012
    Posts:
    881
    I don't understand your explanation about wanting to have a bug report filled to move towards fixing something that you appear to understand already.

    But even then, these issues are not bug related, i will explain.

    This is functionality that should had been planned before implementing this asset. If you offer the feature of re-importing the psd then you need to plan on some sort of check if that psd was changed. So either you don't allow a re-import of the psd if the asset logic can't handle it. Or you plan to check if the dimensions had changed, if the are more layers, stuff like that.

    It is obvious that the point of this asset is iterating between updating the graphics, looking how they work inside unity, getting back and doing changes, checking them again in unity.

    if every time you update the psd you need to recreate the skeleton, meshes, animations, then this pointless.

    There is a lack of understanding on how important this asset is for unity. This is the only feature that unreal doesn't have. I bet many devs continue to struggle with unity just because unreal doesn't have this asset.
     
  10. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    9,404
    It should take you minutes. It means that you can track the issue and when and where it lands. It also means we can come back here and say we definately fixed the issue you were seeing. We cannot verify it does without that in all cases, despite you suggesting it's always going to be the case. It might be obvious here but you asked why we ask for bug reports. There's plenty of times fixes land only for a user to state that they're still having the same issue, that's frustrating for the user and us alike; it's because there's another code-path to reproduce "the issue". Not all issues have a single root cause in a workflow; obviously software can be complex. So nobody said we cannot proceed without it (those are your words) but it's super nice to verify for you and us alike that it does indeed fix your case. If you're not interested, then as said above, we'll proceed without your input.

    In the time it took to write all that, you could've graciously submitted a bug report. It's clear you're frustrated but these speculations and assertions are not helping anyone.
     
    DragonCoder likes this.
  11. altepTest

    altepTest

    Joined:
    Jul 5, 2012
    Posts:
    881
    I was asking why you need a bug report for this particular issue that user was talking about and your team replied too.

    Implying that I've said that all bug reports are not needed it just an insult against me. Not nice man. You are implying that I'm stupid and I don't understand what bug reports are for.

    what you call speculations are obvious features that should work for this asset. maybe you didn't even read what I've said there.

    If you allow the reimport of the psd/psb (the point of the entire 2D skeleton package, which is a great idea and a great asset) you need to plan for variables like the user changing the graphics or the size of the psb document.

    Obviously if these actions by the user are found by your team to create problems that are hard or impossible to fix, place some sort of checks or guidelines to prevent those issues
     
  12. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    9,404
    Speculation and assertions regarding the Unreal/Unity stuff. You are being argumentative at this point and derailing this thread so let's leave it there.
     
  13. Upp000

    Upp000

    Joined:
    Mar 4, 2021
    Posts:
    84
    Is issue2 fixed now? How do I know when it is fixed?
     
  14. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    848
    @Upp000 since we did not have a bug ticket for the issue, we did not look into it in the previous batch. I will take a look once time permits.
    If you would like to follow this issue, do file a bug report, as this will give you email notifications of our progress.
     
  15. Upp000

    Upp000

    Joined:
    Mar 4, 2021
    Posts:
    84
    what...
     
  16. altepTest

    altepTest

    Joined:
    Jul 5, 2012
    Posts:
    881
    if you are trying to work with psd and you want to animate them, I suggest investing in this asset.

    https://assetstore.unity.com/packages/tools/animation/anyportrait-111584

    don't get scared about the price and maybe you are lucky and the 50% off is still available.

    this works the same as spine2D which cost $400. it has the same advanced stuff, physics, morphs, bounce. it really is under priced. you can set up controllers to animate the individual vertex points on the mesh, it includes a custom animation editor. inverse kinematics. a lot of stuff. here is a list of the features they have.

    https://rainyrizzle.github.io/en/AdManual.html

    I'm not affiliated with that asset in any way but I've purchase it and was amazed of the various features that are included.

    you can try submitting bug reports and hope unity will fix this free asset, but realistically it may take a lot of time, because of how unity development works. and also if you take a look at the link bellow, you can see that it is not an easy "fix" to do. To make sure that the importer will not mess the positions of sprites in the skin editor is quite a complicated matter.

    so for the specific issue you have posted here is how anyportrait deals with this, and what tools it has.

    https://rainyrizzle.github.io/en/AdvancedManual/AD_RePSD.html
     
    EvOne likes this.
  17. Upp000

    Upp000

    Joined:
    Mar 4, 2021
    Posts:
    84
    Yeah, I do know it is not an easy fix, but the issue was not present in 6.0.4, so basically they changed something and caused this issue. I thought they would consider this top priority because it is a core issue, the later they fix it the more troublesome it becomes.
    But they skip it because I didn't send them a bug report.
    Should have told me this so I would find some time to send them the bug report.
     
    Last edited: Jan 4, 2023
    EvOne likes this.
  18. altepTest

    altepTest

    Joined:
    Jul 5, 2012
    Posts:
    881
    to be fair they did argued with me a few posts above, quite vehemently actually, that they need a bug report even if common sense would dictate it should not been required.

    probably there is an internal track system, with someone holding a whip making sure that staff do the job they are assigned too and not some unplanned changes.

    downside of being a wild card I guess is that you can mess things up for the rest of the team when you work on stuff not agreed before by everyone.
     
  19. AnaWilliam850

    AnaWilliam850

    Joined:
    Dec 23, 2022
    Posts:
    36
    thanks for the update, I hope this works well
     
  20. fleity

    fleity

    Joined:
    Oct 13, 2015
    Posts:
    256
    I updated the project in which I use the 2d psd importer from 2022.1 to 2022.2 and the package version which I handpicked (7.0.3) got updated to version 8.0.1 (with possible update to .2)

    Is 8.0.x the expected version for 2022.2 or is it possible to stick with 7.0.3?

    I ask because with v8 when I select a psd in the project view the following warning gets thrown:
    Code (CSharp):
    1. Invalid image specified
    2. UnityEngine.UIElements.UIElementsRuntimeUtilityNative:UpdateRuntimePanels ()
    edit: found another related error in the editor log
    Code (CSharp):
    1. InvalidOperationException: The operation is not possible when moved past all properties (Next returned false)
    2.   at UnityEditor.SerializedProperty.get_objectReferenceValue () [0x00013] in <f7044ab663d344a2badf1160e57d1c1d>:0
    3.   at UnityEditor.GenericInspector.CheckIfScriptLoaded (UnityEditor.SerializedProperty scriptProperty) [0x00007] in <f7044ab663d344a2badf1160e57d1c1d>:0
    4.   at UnityEditor.GenericInspector.ShowScriptNotLoadedWarning (UnityEditor.SerializedProperty scriptProperty, System.Boolean isPartOfPrefabInstance) [0x00001] in <f7044ab663d344a2badf1160e57d1c1d>:0
    5.   at UnityEditor.UIElements.InspectorElement+<>c__DisplayClass68_0.<AddMissingScriptLabel>b__0 () [0x00000] in <f7044ab663d344a2badf1160e57d1c1d>:0
    6.   at UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) [0x00291] in <469e18a818964f39910fa06bef052d82>:0
    7.   at UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) [0x000c4] in <469e18a818964f39910fa06bef052d82>:0
    8.   at UnityEngine.UIElements.IMGUIContainer.DoIMGUIRepaint () [0x00068] in <469e18a818964f39910fa06bef052d82>:0
    9.   at UnityEngine.UIElements.UIR.RenderChainCommand.ExecuteNonDrawMesh (UnityEngine.UIElements.UIR.DrawParams drawParams, System.Single pixelsPerPoint, System.Exception& immediateException) [0x000e9] in <469e18a818964f39910fa06bef052d82>:0
    10. Rethrow as ImmediateModeException
    11.   at UnityEngine.UIElements.UIR.RenderChain.Render () [0x0011f] in <469e18a818964f39910fa06bef052d82>:0
    12.   at UnityEngine.UIElements.UIRRepaintUpdater.Update () [0x000c0] in <469e18a818964f39910fa06bef052d82>:0
    13.   at UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) [0x0001e] in <469e18a818964f39910fa06bef052d82>:0
    14.   at UnityEngine.UIElements.Panel.UpdateForRepaint () [0x00035] in <469e18a818964f39910fa06bef052d82>:0
    15.   at UnityEngine.UIElements.Panel.Repaint (UnityEngine.Event e) [0x00078] in <469e18a818964f39910fa06bef052d82>:0
    16.   at UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) [0x00051] in <469e18a818964f39910fa06bef052d82>:0
    17.   at UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) [0x0003d] in <469e18a818964f39910fa06bef052d82>:0
    18.   at UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) [0x0001a] in <469e18a818964f39910fa06bef052d82>:0
    19.   at UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) [0x00001] in <469e18a818964f39910fa06bef052d82>:0
    20.   at UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) [0x00010] in <3859f4a893614f508581f22c26c521c2>:0

    and it is not possible to change any of the import settings (I guess because serialized object apply modified properties is not called but the warning is so opaque all I can say for sure is it is an issue with an UIElements panel).

    Or is there a workaround to this issue?

    Workarounds:
    - manually edit the meta files :-/
    - save presets and edit those in a text editor. They can be applied but psd importer presets can not be edited in the inspector too
    - right click copy paste on the importer properties works too
     
    Last edited: Jan 12, 2023
  21. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    848
    Hello,

    In the latest PSD Importer documentation, we added a table to make it easier to see which package version goes for which major Unity version (link).



    You should use the specified major version of the PSD Importer package for your project, as they are created with the available Unity Editor APIs for that specific version. So in your case, your project is using Unity 2022.2, so you should use PSD Importer 8.0.2. 8.0.2 contains a few bug fixes, so I do recommend that you bump the version from 8.0.1 to 8.0.2.

    Onwards to your issue!
    I saw that the error has been mentioned internally, but it seems to only happen when you have the inspector in debug mode and you enter playmode. If you still have the meta files, please file a bug report, so we can take a closer look.

    Thanks, and sorry for the bumpy upgrading of your project
     
  22. Zebadiah

    Zebadiah

    Joined:
    Apr 6, 2014
    Posts:
    60
    Is there any way to import the layers without trimming them? I've got an animation with each frame on a separate layer in photoshop, and I'd like to make an Animated Tile from the layers. Seems like I'd simply be able to drag the sprites into the Animated Tile settings in the Inspector, but of course nothing lines up because every sprite is a different size / shape due to the trimming.

    I think it would generally be useful for situations where you can't use the rig to position the individual sprite renderers and you just want everything to line up correctly when the sprites are all in the same location. Right now the importer seems great for characters and complex things but kind of terrible for something super simple like animation frames.

    Really I'm just looking for the functionality of https://www.johnwordsworth.com/projects/photoshop-sprite-sheet-generator-script/ but built into Unity. This PSD importer is getting so close, but it somehow missed what seems like simplest use-case. Or maybe I'm just trying to do my animations fundamentally wrong and there's some better way, idk!
     
    EvOne and fleity like this.
  23. fleity

    fleity

    Joined:
    Oct 13, 2015
    Posts:
    256
    I've been wondering the same thing but haven't found a solution for this either.

    My case is I have a psd with a bunch of icons all fitted in a 200x200 (but resolution doesn't matter really) psd document. I load them in a visual element which scales them proportionally but since they are trimmed by the importer they never exactly end up where / how I want them inside the visual element. The only (really bad) workaround I could think of so far was to add a small 1% opacity background to them to force them to use a full rect packing / sprite size.

    btw: reported that bug including psd file etc.
     
    Last edited: Jan 20, 2023
  24. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    848
    Currently, no. But I will add this feature request to our backlog.

    Some behind the scenes info, if you are curious:
    Different DCC tools exporting .psd/.psb files work slightly different, but the majority of the tools tend to do a tight trim for the content in a layer. So the data we receive when importing the file inside of Unity tends to already be trimmed. This trim is not always as good as it can be, and sometimes not done by the DCC tool, therefore we also have our own trim pass, so that the resulting Sprite ends up the same, no matter the initial DCC tool.

    In 2022.2, we added the ability to add a padding to all Sprites generated, but this is one value for all the Sprites, so if your icons/tiles are being trimmed with different values, this option will not help you.

    Thanks! We'll take a look
     
    fleity and Zebadiah like this.
  25. Upp000

    Upp000

    Joined:
    Mar 4, 2021
    Posts:
    84
    I have sent a bug report but I lost the link to it because I lost my email. Can you give me the link or should I resend the bug report?
     
  26. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    848
    @Upp000 could you DM me your previous e-mail? Then I can check with QA to see if they can find your bug report.
     
  27. Upp000

    Upp000

    Joined:
    Mar 4, 2021
    Posts:
    84
    Sorry, actually I forgot the email address, I just can't remember it.
    The bug report is simply a copy of of my previous post. So maybe you can search it with some text, if it can be searched this way. Or maybe I should resend the bug report?

    "
    There is one simple test you can try out.
    Draw a simple shape like this, each color is a separate layer.


    Import it to unity and look at the skinning editor.


    Extend the yellow line.


    Replace the psb file. And look at the skinning editor.



    Instead of hiding the extended part, the geometry has moved. I think the same would happen if you erase part of the line instead of extending it. The point is, artists always want to modify their art. And making things longer or shorter shouldn't move the geometry in skinning editor.
    And also make sure the geometry wouldn't move if you remove or add layers in the ps."
     
  28. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    848
    If you do not remember your email, then please resubmit the bug report. This way you will get the email notifications of our progress looking into and resolving the issue, like you requested previously.
    Thanks!
     
  29. Upp000

    Upp000

    Joined:
    Mar 4, 2021
    Posts:
    84
    I have sent the report
     
    Ted_Wikman likes this.
  30. thegreatzebadiah

    thegreatzebadiah

    Joined:
    Nov 22, 2012
    Posts:
    836
    @Ted_Wikman Has their been any progress on implementing an option to not trim the layers?
     
  31. Ted_Wikman

    Ted_Wikman

    Unity Technologies

    Joined:
    Oct 7, 2019
    Posts:
    848
    @thegreatzebadiah I am no longer working on PSD Importer, but to get the latest info in what has been released, you can always check its changelog. As of right now, this option has not been shipped.