Post

[유니티] It looks like you want to tile a sprite with no border

[유니티] It looks like you want to tile a sprite with no border

에러:It looks like you want to tile a sprite with no border.

image

It looks like you want to tile a sprite with no border. It would be more efficient to modify the Sprite properties, clear the Packing tag and set the Wrap mode to Repeat.

이미지 타입을 Tiled로 바꿀 때 나타나는 오류다.


해결방법

  1. source image로 사용한 파일의 Wrap Mode를 Repeat로 바꾼다. 이때 새로운 오류가 나올 수 있는데 해결 방법은 아래에 작성했다.

    image


기타 오류

  1. Only textures with width/height being multiple of 4 can be compressed to DXT5 BC3 format은 넓이와 높이가 4의 배수인 텍스쳐만 DXT5 BC3 포맷으로 압축이 가능하다는 내용이다. 따라서 사진의 크기를 확인해야 된다.

    image

    왼쪽 사진이 원본 사진 크기인데 4의 배수가 아닌 것을 확인할 수 있다. 따라서 오른쪽처럼 4의 배수로 바꾼다면 이미지가 나온다.

    image

    다른 방법으로는 이미지 설정을 다음과 같이 변경해도 오류는 없다.

    image

    image

  2. This Image doesn’t have a border.

    Image 타입이 sliced일 때 해당 오류가 나온다.

image

Window > Package manager로 들어간 후 2021.3.32f1 기준으로 Packages: Unity Registry에서 2D sprite를 설치한다.

image

이후에 이미지 Inspector에 들어가면 텍스쳐 타입이 Sprite인 경우에 Sprite Editor를 확인할 수 있다.

image

Sprite Editor 창으로 통해 Border값을 LRTB 중 하나라도 수정하고 save하면 해당 오류가 나오지 않는 것을 확인할 수 있다.

image


참조

https://fiftiesstudy.tistory.com/258

https://sunpil.tistory.com/482

This post is licensed under CC BY 4.0 by the author.