Search Unity

Question Is there a way to slice each PSB layer into sprites?

Discussion in '2D' started by IgorArnaut, Aug 16, 2022.

  1. IgorArnaut

    IgorArnaut

    Joined:
    Nov 15, 2021
    Posts:
    39
    Is there a way to slice layered PSB into a sprite sheet like this?
    psb-slice-question.png
    Here is what Unity shows.
    psb-slice-question-2.png
     
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,500
    I'll move your post to the 2D forum. This forum as quoted in its description is "For feedback on the experimental 2D preview."

    Thanks.
     
    IgorArnaut and MarekUnity like this.
  3. MarekUnity

    MarekUnity

    Unity Technologies

    Joined:
    Jan 6, 2017
    Posts:
    207
    @IgorArnaut if you want to import it like a normal sprite sheet you can set the Import Mode to Merged in the Layer Import section of the inspector. This will merge your psb layer together into one and you should be able to slice them like a normal sprite sheet.
     

    Attached Files:

  4. IgorArnaut

    IgorArnaut

    Joined:
    Nov 15, 2021
    Posts:
    39
    The thing is that I don't want sprites to be merged, but appear merged. Something like this:

    Locks_0, Locks_1, Locks_2, Locks_3
    Top_0, Top_1, Top_2, Top_3
    Bottom_0, Bottom_1, Bottom_2, Bottom_3
    Lock_0, Lock_1, Lock_2, Lock_3.

     
    Last edited: Aug 19, 2022
  5. MarekUnity

    MarekUnity

    Unity Technologies

    Joined:
    Jan 6, 2017
    Posts:
    207
    I'm not sure what you mean by appear merged. Setting it to merged will flatten the image and make it look like in the source .psb file.
     
  6. IgorArnaut

    IgorArnaut

    Joined:
    Nov 15, 2021
    Posts:
    39
    In the sprite editor it should appear merged and image can be sliced, but sprites should be like L1S1, L1S2, L1LS3, L2S1 etc.
     
  7. MarekUnity

    MarekUnity

    Unity Technologies

    Joined:
    Jan 6, 2017
    Posts:
    207
    Can you slice them in the Sprite Editor the way you want? Maybe you could share a screenshot to illustrate the problem.
     
  8. rustum

    rustum

    Unity Technologies

    Joined:
    Feb 14, 2015
    Posts:
    190
    Hi @IgorArnaut! Thanks for the question. Please help me understand more!

    What do the lines of names represent?

    For: "Locks_0, Locks_1, Locks_2, Locks_3" can you confirm that these are a single layer in Photoshop? In Unity do you want to slice these 4 sprites from a single layer? Or do you want them to be merged into a single texture in Unity? Or is the most important result that they are displayed together in the Sprite Editor?
     
  9. IgorArnaut

    IgorArnaut

    Joined:
    Nov 15, 2021
    Posts:
    39
    These are split sprites of a layer. Yes, I want a PSB be split into sprites per layer, but appear as a flattened image in Sprite Editor.
     
  10. rustum

    rustum

    Unity Technologies

    Joined:
    Feb 14, 2015
    Posts:
    190
    Interesting! Thanks for confirming that.
    Would you expect to get multiple sprites from each layer?
    How is this result useful to your workflow? Could you tell us more about it?