https://docs.unity3d.com/kr/2019.4/Manual/com.unity.vectorgraphics.html
벡터 그래픽스 - Unity 매뉴얼
docs.unity3d.com
https://docs.unity3d.com/Packages/com.unity.vectorgraphics@2.0/manual/index.html
About Vector Graphics | Vector Graphics | 2.0.0-preview.24
About Vector Graphics The Vector Graphics package provides an SVG importer as well as generic vector graphics APIs. ⚠️ The Vector Graphics package is considered experimental and is not recommended to be used in production. Therefore, the package must b
docs.unity3d.com
자세한 내용은 위의 공식 문서 참조
++++++
상단 메뉴 탭 중 Window > Package Manager 클릭
Package Manager > Unity Registry 클릭
왼쪽 상단의 + 버튼을 누른 다음, Add package from Git URL 선택
다음 url을 붙여넣고 Add 버튼 클릭
com.unity.vectorgraphics
여기까지 하고 나면 위와 같이
유니티 에디터에서 svg 파일을 인식할 수 있게 된다.
그런데,
여기에서 유의할 점이 있다.
인식된 svg 파일을 Hierarchy 창으로 2D오브젝트 (Sprite Renderer)로 가져올 때는 잘 보이지만
Canvas의 Image로 가져올 때에는
이미지가 보이지 않는 현상이 일어난다.
이때, 해당 svg 파일의 inspector에서
Generated Asset Type을
Vector Sprite > Textured Sprite 로 바꿔주면
정상적으로 Canvas의 Image > Sourece Image 로도 보이는 것을 확인할 수 있다.
당연히 오브젝트(Sprite Renderer)로도 이미지가 보인다.

'메모장' 카테고리의 다른 글
게임 클라이언트 문제 메모 (0) | 2024.03.25 |
---|---|
게임 알고리즘 문제 메모 (0) | 2024.03.22 |
이벤트(Event), 이벤트 핸들러(EventHandler), 그리고 이벤트 기반 프로그래밍(Event-driven programming) (0) | 2024.02.26 |
System.Text.RegularExpressions.Regex.IsMatch - 문자열 매칭 메서드 (0) | 2024.02.23 |
[BigNumberConverter] 재화 단위 시스템으로 숫자 변환 (0) | 2024.02.20 |