728x90

MS Bing์˜ ์ง€๋„๋Š” ํ•˜๋‚˜์˜ Object ์•ˆ์— ๋งต ๋ฐ์ดํ„ฐ๋ฅผ ๊ทธ๋ฆฌ๋Š” ๋ฐฉ์‹์ด๋‹ค. ์ค‘์‹ฌ ์ขŒํ‘œ๋ฅผ ๋ฐ”๊ฟ€ ๋•Œ๋งˆ๋‹ค Shader๋กœ ์ง€๋„๋ฅผ ๊ทธ๋ฆฐ๋‹ค.

 

Mapbox๋Š” ์—ฌ๋Ÿฌ ๊ฐœ์˜ Tile Object๋ฅผ ์ƒ์„ฑํ•˜๋Š” ๋ฐฉ์‹์ด๋‹ค. ์ค‘์‹ฌ ์ขŒํ‘œ๋‚˜ ๋งต ํฌ๊ธฐ๋ฅผ ๋ฐ”๊พธ๋ฉด ํƒ€์ผ ๋ฐ์ดํ„ฐ๋ฅผ ์ƒˆ๋กญ๊ฒŒ ์ƒ์„ฑํ•œ๋‹ค. 

 

๋งต์„ ๊ฐ€์ ธ์˜ค๋Š” ๋ฐฉ์‹์„ ๋ฐ”๊ฟ€ ์ˆ˜ ์žˆ๋Š” ์ง€๋Š” ํ™•์ธ์„ ์•ˆ ํ•ด๋ดค๋Š”๋ฐ, ์ผ๋‹จ ๊ธฐ๋ณธ์ ์œผ๋กœ ์œ„์™€ ๊ฐ™์ด ๊ฐ€์ ธ์˜จ๋‹ค.

 

ํ”„๋กœ์ ํŠธ์—๋Š” Mapbox ๋ฐฉ์‹์ด ์ ํ•ฉํ•˜์—ฌ ์ด๊ฑธ๋กœ ๋ณ€๊ฒฝํ•จ.

 

 

 


์„ค์น˜ ๋ฐฉ๋ฒ•

 

Install the Maps SDK for Unity

Add the Maps SDK for Unity dependency and required configuration to your app

www.mapbox.com

 

1. Mapbox SDK Importํ•˜๊ธฐ

์ง€๋„๋งŒ ์‚ฌ์šฉํ•  ๊ฒƒ์ด๋ผ๋ฉด Mapbox๋งŒ ๋ฐ›์•„๋„ ๋œ๋‹ค.

 

 ERROR 

๋”๋ณด๊ธฐ

AR ๊ด€๋ จ Namespace๋ฅผ ์ฐพ์ง€ ๋ชปํ•˜๋Š” ๋ฌธ์ œ

1. SpatialTracking

Assets\GoogleARCore\SDK\InstantPreview\Scripts\InstantPreviewManager.cs(32,23): error CS0234: The type or namespace name 'SpatialTracking' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)

-> AR Foundation ํŒจํ‚ค์ง€ ์„ค์น˜ํ•˜๊ธฐ

Window - Package Manager - Unity Registry์—์„œ ํ•„์š”ํ•œ ํŒจํ‚ค์ง€๋ฅผ ์„ค์น˜ํ•˜๋ฉด ๋œ๋‹ค.

 

2. ARBackgroundRenderer

Assets\UnityARInterface\Scripts\ARCoreInterface.cs(51,17): error CS0246: The type or namespace name 'ARBackgroundRenderer' could not be found (are you missing a using directive or an assembly reference?)


Assets\UnityARInterface\ARRemote\Scripts\ARRemoteEditorInterface.cs(40,17): error CS0246: The type or namespace name 'ARBackgroundRenderer' could not be found (are you missing a using directive or an assembly reference?)


Assets\UnityARInterface\Scripts\ARKitInterface.cs(26,17): error CS0246: The type or namespace name 'ARBackgroundRenderer' could not be found (are you missing a using directive or an assembly reference?)

 

Assets\GoogleARCore\SDK\Scripts\ARCoreBackgroundRenderer.cs(43,17): error CS0246: The type or namespace name 'ARBackgroundRenderer' could not be found (are you missing a using directive or an assembly reference?)

 

UnityARInterface์™€ GoogleARCore์™€ ๊ด€๋ จ๋œ ์—๋Ÿฌ๊ฐ€ ๋œฌ๋‹ค. AR์„ ์‚ฌ์šฉํ•˜์ง€ ์•Š๊ณ  ๋งต๋งŒ ์‚ฌ์šฉํ•˜๊ณ ์ž ํ•œ๋‹ค๋ฉด Package Import ์‹œ Mapbox๋งŒ ๋ฐ›์œผ๋ฉด ๋˜๊ธฐ ๋•Œ๋ฌธ์— ๊ตณ์ด ์‹ ๊ฒฝ ์“ฐ์ง€ ์•Š์•„๋„ ๋˜๊ธด ํ•จ

 

AR ๊ด€๋ จ ํด๋ž˜์Šค๋ฅผ ์ฐพ์ง€ ๋ชปํ•ด์„œ ๋ฐœ์ƒํ•˜๋Š” ์—๋Ÿฌ์ธ๋ฐ, ๊ตฌ๊ธ€๋งํ•œ ๊ฒฐ๊ณผ Unity ๋ฒ„์ „์— ๋”ฐ๋ฅธ ํŒจํ‚ค์ง€/๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์ข…์†์„ฑ ๋ณ€๊ฒฝ์„ Mapbox๊ฐ€ ๋ฐ˜์˜ํ•˜์ง€ ์•Š์€ ํƒ“์ด๋‹ค. ์ฐธ๊ณ (Mapbox-Github-Issue) ๊ผญ ์‚ฌ์šฉํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด Unity Editor๋ฅผ 2018 ํ˜น์€ ๊ทธ ์ดํ•˜๋กœ ๋‹ค์šด๊ทธ๋ ˆ์ด๋“œํ•˜๊ณ  ๊ด€๋ จ ํŒจํ‚ค์ง€ ๋ฒ„์ „์„ ์ด๋ฆฌ์ €๋ฆฌ ์กฐ์ •ํ•˜๋Š” ๋ฐฉ๋ฒ•๋ฐ–์— ์—†๋Š” ๋“ฏํ•˜๋‹ค.

AR ๊ธฐ๋Šฅ์„ ์ˆ˜์ •ํ•  ์˜ˆ์ •์ด ์•„์ง์€ ์—†์œผ๋ฏ€๋กœ AR ๊ด€๋ จ ํด๋”๋ฅผ ์‚ญ์ œํ•˜๊ณ , ํ•„์š”ํ•œ ๊ฒฝ์šฐ ๋…์ž์ ์œผ๋กœ AR ์†”๋ฃจ์…˜์„ ๋งŒ๋“ค์–ด์„œ ์‚ฌ์šฉํ•˜๋ผ๋Š” ๋‹ต๋ณ€ (2021.11.03)

 

 

DeviceLocationProvider.cs์˜ UTF-8 ์ธ์ฝ”๋”ฉ ๋ฌธ์ œ

Assets\Mapbox\Unity\Location\DeviceLocationProvider.cs(321,12): error CS0103: The name 'heading' does not exist in the current context

์ฐธ๊ณ  (Mapbox-Github-Issue)

 

DeviceLocationProvider.cs ์Šคํฌ๋ฆฝํŠธ ํŒŒ์ผ ๋‚ด ์ธ์ฝ”๋”ฉ ๋ฌธ์ œ๋กœ ์•„๋ž˜์™€ ๊ฐ™์ด  ° ๊ธฐํ˜ธ๊ฐ€ ๊นจ์ ธ์„œ ์ƒ๊ธฐ๋Š” ๋ฌธ์ œ์ด๋‹ค. 

//fix heading to have 0๏ฟฝ for north, 90๏ฟฝ for east, 180๏ฟฝ for south and 270๏ฟฝ for west

๊นจ์ง„ ๋…€์„๋“ค์„ ๋ชจ๋‘ ์ฐพ์•„์„œ ์ง€์›Œ์ฃผ๋ฉด ๋˜๋Š”๋ฐ ๊ท€์ฐฎ์œผ๋ฉด ์—ฌ๊ธฐ์— ์žˆ๋Š” ์ฝ”๋“œ๋ฅผ DeviceLocationProviders.cs์— ๊ทธ๋ƒฅ ๋ถ™์—ฌ ๋„ฃ์–ด๋„ ๋จ.

 

 

 

 

2. ํ† ํฐ ์„ค์ •ํ•˜๊ธฐ

Import๊ฐ€ ์ œ๋Œ€๋กœ ๋˜์—ˆ๋‹ค๋ฉด, ์—๋””ํ„ฐ์— Mapbox๋ฉ”๋‰ด๊ฐ€ ์ƒ์„ฑ๋˜๊ณ  Setup ์„ค์ •์ฐฝ์ด ์—ด๋ฆฐ๋‹ค.

 

Mapbox์— ๊ฐ€์ž…ํ•˜์—ฌ ๋ฐœ๊ธ‰๋ฐ›์€ ํ† ํฐ์€ ๊ณ„์ • ์ฐฝ์ด๋‚˜ ์„ค์น˜ ๊ฐ€์ด๋“œ์—์„œ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค.

์„ค์ •์ฐฝ์— ๋ฐœ๊ธ‰๋ฐ›์€ ํ† ํฐ์„ ์ž…๋ ฅํ•˜๊ณ  Submit ํ•œ๋‹ค. ์œ ํšจ์„ฑ ๊ฒ€์ฆ๊ณผ ๋™์‹œ์— ์ด ํ”„๋กœ์ ํŠธ์—์„œ ์‚ฌ์šฉ๋  ํ† ํฐ์œผ๋กœ ์ €์žฅ๋จ.

 

 

 

 

3. Sample Map ํ™•์ธํ•˜๊ธฐ

ํ•ด๋‹น ํ† ํฐ์„ ์‚ฌ์šฉํ•˜์—ฌ ๊ฐ€์žฅ ๊ธฐ๋ณธ์ ์ธ Map Prefab์„ ์ œ๋Œ€๋กœ ๋ถˆ๋Ÿฌ์˜ค๋Š”์ง€ ํ™•์ธํ•ด๋ณด๊ธฐ

- Assets/Mapbox/Prefabs์— ์žˆ๋Š” Map.prefab์„ Hierarchy์— ์ถ”๊ฐ€ํ•œ๋‹ค.

- Location ๊ฐ’์„ ์ž…๋ ฅํ•˜๊ณ , Enable Preview๋ฅผ ํ™œ์„ฑํ™”ํ•˜๋ฉด Scene์—์„œ ์ง€๋„ ๋ฐ์ดํ„ฐ๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค.

 

 

 

4. ์ฃผ์š” ๊ตฌ์„ฑ

 

Mapbox์˜ Map์€ ํƒ€์ผ ์ œ๊ณต์ž์™€ ํƒ€์ผ ์˜ค๋ธŒ์ ํŠธ๋กœ ๊ตฌ์„ฑ๋œ๋‹ค. 

 

 

ํƒ€์ผ ์˜ค๋ธŒ์ ํŠธ๋Š” Terrain์ด ์•„๋‹ˆ๊ณ  Mesh Renderer๋ฅผ ๊ฐ€์ง€๋ฉฐ Tile ์Šคํฌ๋ฆฝํŠธ๋ฅผ ํฌํ•จํ•œ๋‹ค.

 

 

๋งต ์„ค์ •์€ ๊ฐ€์žฅ ์ตœ์ƒ๋‹จ์˜ Map ์˜ค๋ธŒ์ ํŠธ์˜ Abstract Map ์Šคํฌ๋ฆฝํŠธ์—์„œ ๊ด€๋ฆฌํ•œ๋‹ค.

 

 

Tile ์†์„ฑ ๋ณ€๊ฒฝ

 

 

Map Material์˜ Texture

 

 

 


728x90

+ Recent posts