Search Unity

2D Sprite asset border problem

Discussion in '2D' started by amiga4K, Apr 26, 2021.

  1. amiga4K

    amiga4K

    Joined:
    Jan 30, 2018
    Posts:
    71
    Hello, I created a simple sprite asset: a square with Create > 2D > Sprites > Square.
    I have also make this settings:
    • Wrap Mode -> Clamp
    • Filter Mode -> Point no filter
    • Format -> Automatic
    • Compression -> None
    • Project Settings -> Quality -> Anti Aliasing -> Disabled
    • Main Camera -> Add Component -> Pixel Perfect Camera
    However when I put the square into the scene there is a grey "border" around it.

    Unity_wJwuYs0z8t.png

    Is this a Unity bug? Why does that border is rendered around the square?

    Thanks.
     
  2. DanielTanBK

    DanielTanBK

    Unity Technologies

    Joined:
    Aug 20, 2019
    Posts:
    82
    Hello,

    Yes, this was an intended design change in a few versions of Unity, but was reverted back after user feedback
    A similar case was tracked under: https://issuetracker.unity3d.com/is...issing-when-trying-to-create-standard-sprites

    The grey borders should not appear in Unity 2020.3.3f1, 2021.1.0f1, 2021.2.0a8 and above
    Do upgrade to these versions or later to get these changes, if you are still able to reproduce this issue or are unable to upgrade do let us know
     
  3. amiga4K

    amiga4K

    Joined:
    Jan 30, 2018
    Posts:
    71
    Hi,

    I actually discovered this when I imported the generated sprite (Square.png) into Photoshop and realised that the 4-pixel grey border is not an artefact of Unity's rendering engine but is actually a drawn border.

    I downloaded a new Unity app (version 2021.1.4f1) and fortunately that border is no longer present as you can see from the image below:

    Unity_UlH566npgQ.png

    Thanks for the support!!!
     
    Last edited: Apr 29, 2021