Search Unity

SpriteShape Preview Package

Discussion in '2D Experimental Preview' started by rustum, Mar 19, 2018.

  1. a3dline

    a3dline

    Joined:
    Dec 28, 2013
    Posts:
    11
    upload_2019-7-5_14-49-31.png
    Please fix this line.
     
  2. unity_2JZVVIhvhCNpzQ

    unity_2JZVVIhvhCNpzQ

    Joined:
    Jul 6, 2019
    Posts:
    1
    I installed package 2D Sprite Shape, but when I went to Sprite Shape Profile I didn't find three types of Profiles: Empty, Strip, and Shape. Three are only two types Open Shape and Close Shape. What should I do to add three types of Profiles: Empty, Strip, and Shape?
     

    Attached Files:

    • 2.png
      2.png
      File size:
      170.2 KB
      Views:
      72
  3. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    175
    In recent versions we have renamed the Asset Profiles.
    Open Shape is same as Strip
    Close Shape is same as Shape.
    Empty simply does not have any Angle Range defined. So just create a profile and remove Angle Ranges if you would like to have one. More info here :
    https://docs.unity3d.com/Packages/com.unity.2d.spriteshape@2.1/manual/SSProfile.html

    Thanks. This has been fixed in 2.0.0-preview.8 (2019.1) and 2.1.0-preview.10 (2019.2) versions of the Package.
     
  4. yuanxing_cai

    yuanxing_cai

    Unity Technologies

    Joined:
    Sep 26, 2014
    Posts:
    189
    We've fixed this sorting issue internally, but it needs time before you can have the fix. For now a workaround is to use two different materials for the fill part and the edge part. They can use the same shader, but they have to be two distinct asset files.
     
    Venkify and jbarba109 like this.
  5. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,064
    When using SpriteShape v2.1.0 with Unity 2019.2.0b9 I get tons of errors when installing the package AFTER I installed the LWRP package like this:

    Library/PackageCache/com.unity.2d.spriteshape@2.1.0-preview.10/Editor/SpriteShapeControllerEditor.cs(9,23): error CS0234: The type or namespace name 'Path' does not exist in the namespace 'UnityEditor.U2D' (are you missing an assembly reference?)

    Or this:

    Library/PackageCache/com.unity.2d.spriteshape@2.1.0-preview.10/Editor/SpriteShapeControllerEditor.cs(16,50): error CS0246: The type or namespace name 'PathComponentEditor<>' could not be found (are you missing a using directive or an assembly reference?)

    I removed the package and LWRP and then installed SpriteShape again. Worked.
    Just letting you know :)
     
  6. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    175
    BTStone likes this.
  7. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,064
    @Venkify Alright, great! :)

    Question:
    When working with the SpriteShapeProfile, we can set the Offset of the Fill-Texture. Is there a reason it's an "universal" offset in x AND y? Can't they be seperate?
    Also an X/Y-Offset for each Sprite-Variant in a SpriteShapeProfile would be great.
    I'd like to offset those sprite-variants in relation to the fill texture since they are positioned below they edge of the fill which let's the edge of the fill look through at some points. I know I can change the pivot point of the sprite but I'd would be more flexibel to have the option with the offsets.

    I made a quick video demonstrating how it looks when I set the sprite and how I want to it to look like placing the sprite directly on top:
     
    EvOne likes this.
  8. pastaluego

    pastaluego

    Joined:
    Mar 30, 2017
    Posts:
    49
    Can you clarify this? You say you can use two different materials for the fill and edges, but isn't that not possible since the spriteshaperenderer only takes 1 mat? Or is it possible in 2019.2 version and not 2019.1 (the one I'm using right now).
     
  9. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    175
    Its available for 2019.2 since 2019.2.0b7 Please get the latest beta and 2019.3 as well.

    Thanks. Will take a look.
     
    yuanxing_cai likes this.
  10. Pebbl3s

    Pebbl3s

    Joined:
    Apr 13, 2013
    Posts:
    5
    Has anyone else been getting the issue where corners just don't show up? (Confirmed all points in the SpriteShape are in Linear Point Mode as per the docs). No matter what I can't seem to get them to show up. Any help is appreciated :)
     
  11. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    175
    @Pebbl3s
    For a point to be considered to be a corner the following condition should hold:
    1. A valid Corner Sprite is set in the SpriteShape Profile.
    2. The corner point and neighbor points should be in Linear Tangent mode (Straight line from point to point).
    3. The height of the Point and neighbor points should be same too.
     
  12. Pebbl3s

    Pebbl3s

    Joined:
    Apr 13, 2013
    Posts:
    5
    @Venkify So these are the corner sprite import settings
    Screen Shot 2019-08-02 at 2.46.56 PM.png

    And they're added to the SpriteShape. (I added the same sprite to all corners just for good measure)
    Screen Shot 2019-08-02 at 2.47.11 PM.png

    And these are the 3 adjacent points, all with matching height and linear point mode
    ALL.png

    Yet this is the result...
    Screen Shot 2019-08-02 at 2.49.05 PM.png

    Is there something I'm missing here? It seems like they should be showing up
     
  13. rustum

    rustum

    Unity Technologies

    Joined:
    Feb 14, 2015
    Posts:
    40
    SpriteShape 2.1.0.preview.11 for 2019.2 is now available!

    This version adds a back-port that ensures that the SpriteShape object generates geometry even if not visible in the Camera.
     
    Last edited: Aug 4, 2019
  14. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    175
    Please set Pivot to center for corner sprites. Could you please submit a bug report if the issue persist?
     
  15. Milten2222

    Milten2222

    Joined:
    Nov 14, 2017
    Posts:
    7
    Is it possible to use 2D shapes together with 2D isometric tilemaps to create curvy pathes?
    I have tried but I have no idea how the sprite for the road should look like. Using isometric image leads to this result.
     

    Attached Files:

  16. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    4,125
    I've got some sprite shapes that are printing the error "Dimensions of color surface does not match dimensions of depth surface" to the console every time I select them or enter play mode. There's no stack trace. Any idea what I'm doing wrong, and could you perhaps improve that error message?
     
  17. MrZzzero

    MrZzzero

    Joined:
    Dec 9, 2016
    Posts:
    47
    plz help i used the first version of sprite shape in my game and after updating unity i got some errors about sprite shape and i downloaded the latest version errors disappeared but everything ruined in my game levels, also when i tried the new sprite shape i found that there is 2 options open and closed not like the first version where u have 3 options when i do open sprite shape profile it gives me a closed shape is it a bug ? i mean i can't do the same as i did before with the one called strip from the first version, and how to fix my ruined levels sprites shapes ??
    image 1 : ruined strip sprite shape


    images 2 : sprite shape option open



    result : as u see here the open one has 4 parts is it a bug or just need some configuration ?



    image 3 : sprite shape option close (looks like the old one , no problem with it)



    result :

     
  18. MrZzzero

    MrZzzero

    Joined:
    Dec 9, 2016
    Posts:
    47
    please help , its hard for me to redo all levels it takes time and effort
     
  19. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    175
    SpriteShape just follows the path of the spline tiling the sprites defined in the angle-ranges along the way. Could you please be more specific with the use-case, perhaps an image describing it ?
    I believe this issue may not be related to Spriteshape. Looks like a RenderTexture issue. Could you kindly submit a bug report so we can take a look ?
     
  20. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    175
    In recent versions we simplified SpriteShape profiles:
    Strip is now Open Shape
    and Shape is Close Shape. Empty no longer exists.

    There are no functional changes otherwise. Could you please post a sample scene/project so we could help as soon as possible ? That would help us investigate the issue.
     
  21. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    4,125
    The reason why I'm pretty sure that it's the sprite shapes is that it instantly disappears the second I remove the sprite shapes from the scene ;)

    I'll try to remember to send a bug report once I get back to work on Monday.
     
  22. MrZzzero

    MrZzzero

    Joined:
    Dec 9, 2016
    Posts:
    47
    thank you i sent to you a package of a level look ur inbox , ill wait ur help
     
  23. Enixus

    Enixus

    Joined:
    Jul 13, 2019
    Posts:
    2
    Spriteshapes are amazing. It's kind of tricky to draw seamless textures for them, but I'm getting used to it. :)

    One short question:
    I want to manipulate the position of the splines with the animator. Is there a way to access them? Perhaps they could become visible in a list, like the "polygon collider 2d" shows them?
    2019-08-15 21_42_37-Window.png
     
  24. Pebbl3s

    Pebbl3s

    Joined:
    Apr 13, 2013
    Posts:
    5
    Setting the edge pivot to center fixed the issue. Would this be a bug? I don't see anything in the docs that says you need to have the pivot centered in order to use corners
     
  25. Venkify

    Venkify

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    175
    Thanks for the update. We will update the manual/documentation to reflect this requirement.
    This is something we are planning to add support for. Will keep this thread updated regarding this. Thanks for the feedback.
     
    alisia and EvOne like this.
  26. kyuskoj

    kyuskoj

    Joined:
    Aug 28, 2013
    Posts:
    10
    It doesn't work for me. 2019.2.0 / spriteshape preview.11.

    ps. Fixed the problem by changing all of sprite's pivot to center. It's a bit complicated.
     
    Last edited: Aug 23, 2019 at 7:22 PM