ArcGIS Maps SDK for Unity やーる

# はじめに

ArcGIS Maps SDK for Unity やっていきまーす

https://developers.arcgis.com/unity/

# 開発環境
- Windows10 PC
- Unity 2021.3.4f1
- arcgis-maps-sdk-unity-1.0.0

# 導入
1．ArcGISアカウントを作成

https://developers.arcgis.com/sign-up/

2．pluginのダウンロード

https://developers.arcgis.com/downloads/#unity

3．Unityプロジェクトのセットアップ

https://developers.arcgis.com/unity/install-and-set-up/

4．URP または HDRPのプロジェクトを作成

https://developers.arcgis.com/unity/install-and-set-up/add-the-plugin-to-a-new-project/

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/63863/5f6ca91a-8de0-7c77-5eaa-551afc770533.png)

5．Window > Package Manager > Add package from tarballから先ほどダウンロードしたpluginを選択

D:\UnityPackages\arcgis-maps-sdk-unity-1.0.0.tgz

6．Window > Package Manager > ArcGIS Maps SDK for UnityからAll SamplesをImportする

7．サンプルシーンを開く

<!--
- The Map Creator UI provides the option to create a scene without writing any code.
- The components provide functionality that can be attached to game objects in your scene.
- The C# API grants access to the plugin source code.
-->

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/63863/56271b73-cb7a-2bc9-5c6a-324a7aa0196f.png)

8．API Keyの取得

ArcGIS Proにトライアル登録

https://www.esri.com/ja-jp/arcgis/products/arcgis-pro/trial

BuilderかProfessionalどっちで契約するんだろう？

ArcGIS Proで登録したアカウントでログイン

OAuth2.0 > New Application
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/63863/eeb7f416-f4f3-afcd-4ab3-b87b0a5a315b.png)

タイトルと説明を入力
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/63863/954cec8c-6aa8-1803-116d-c706bde210f1.png)

Temporary Tokenを用いる

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/63863/e7e2c673-81fc-ea6e-eee2-f4c7e59485d4.png)

## 3DAttributesSample

3DAttributesSampleを開く

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/63863/c38ce0bd-a410-ad72-2462-5b167acfd29d.png)

Temporary TokenをSample3DAttributesMapCreator > API Keyに貼りつけて実行

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/63863/49c2c604-1302-a046-4c08-a10d0011c506.png)

## APISample

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/63863/56f27a9a-828a-ef7d-c60e-5c7470a0fb59.png)

## ArcGISHitTestSample

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/63863/078daadf-43b3-be34-e3a8-9a73a5d282e8.png)

## ComponentGlobalSample

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/63863/72a4b392-6960-0487-6f09-1acba2b2828a.png)

## ComponentLocalSample

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/63863/fa7fe9d9-d86b-049d-af77-a65e0a207516.png)

## OAuthAPISample

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/63863/d180903b-3e07-44dd-5d14-30ad91d8a08c.png)

<!--
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/63863/923fd37f-e830-8a72-8413-63f49e5ce55c.png)
-->

緯度経度変えてみた

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/63863/f35f5537-30b7-befb-eec2-56124b9ea0e2.png)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/63863/28fe6fc4-cb9c-db3b-d09a-74b9d229cf9b.png)

9．ドキュメントはこちら

https://developers.arcgis.com/downloads/

10．その他のサンプルはこちら

https://developers.arcgis.com/unity/#tutorial

https://github.com/Esri/arcgis-maps-sdk-unity-samples

お疲れ様でした。

<!--
https://github.com/Esri/arcgis-python-api

-->