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.

Bug Last pixel line of images always hidden in file hierarchy preview

Discussion in 'Editor & General Support' started by eMsylf, Jun 2, 2021.

  1. eMsylf

    eMsylf

    Joined:
    Mar 9, 2018
    Posts:
    10
    I was trying to create a mockup icon for an editor tool and noticed that the rounded corners at the bottom were getting cut off. At first I thought this was due to the bottom line starting with a transparent pixel, but after some tests I figured out it was the Unity editor always cutting off the last line of pixels off of an image in the file hierarchy preview.

    I could not find anything in the documentation stating this as intended behavior, so I assume that this is a bug.

    To demonstrate what happens, I have created an extreme example:
    1. An image with dimensions 16 by 2, displaying a magenta line and a yellow line
    2. The image as displayed in the Unity file hierarchy
    As you can see, the yellow line is not visible.
    imagetest-twoline-result.png

    As a final test I cut the yellow pixel line off of the previous image, to see if it would display nothing if the image only consisted of 1 line of pixels. And it did.
    imagetest-oneline-result.png

    Note that the image is still imported correctly, and is shown in full in the import settings.
    imagetest-oneline-importsettings.png

    I tried changing around the import settings but nothing seems to fix this.
    This has been tested and recreated in Unity versions 2019.4.13f1 and 2020.2.6f1.

    How to recreate:
    1. Open up Unity
    2. Add an image to the Assets folder, preferrably one with small dimensions and an obvious feature or color in the last line of pixels
    3. Observe that the last line of pixels is not visible in the preview
    EDIT: The proper term is Project window. I've also narrowed it down to the One Column Layout and when the Two Column Layout is set to the lowest zoom setting.
     

    Attached Files:

    Last edited: Jun 2, 2021
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,231
  3. eMsylf

    eMsylf

    Joined:
    Mar 9, 2018
    Posts:
    10
    Done!
    I narrowed it down to the One Column Layout and when the Two Column Layout is set to the lowest zoom-setting. Otherwise the project window displays the image previews properly.
     
    karl_jones likes this.