Search Unity

Is there anyway to render SpriteShape inside of one Big Sprite

Discussion in '2D' started by terdened1, Oct 8, 2019.

  1. terdened1

    terdened1

    Joined:
    Oct 8, 2019
    Posts:
    1
    I have auto-generated level for platformer, at this moment it displays by LineRenderers like this:
    upload_2019-10-8_11-19-19.png

    But i wanted to use SpriteShapeRenderer to fill all empty space around of my level and also to draw some kind of platforms surface for my level. So i need a way to apply SpriteShapeRenderer as mask for one big sprite.

    Not sure what the best way to do it...

    I thought that i can do it someway like this:
    upload_2019-10-8_11-27-2.png

    But it doesn't works... Sprite Shape surfaces applies only for Sprite Shape and doesn't works with Masks =)
    So here what i got:
    upload_2019-10-8_11-29-32.png

    But i wanted to display platform's surfaces inside of mask.

    I know that i can build Sprite Shape in this way but it looks like a hack:
    upload_2019-10-8_11-33-23.png
    Can someone advise a best way to do it?

    Thank you!
     

    Attached Files: