RealSenseD435/T265のサンプルプログラムやーる（Unity2017.4.13f1）

# はじめに
RealSenseD435/T265のサンプルプログラムやっていきます

# 開発環境
- Windows 10
- Unity Hub
- Unity 2017.4.13f1
- RealSense SDK v2.39
    - Intel.RealSense.SDK-WIN10-2.39.0.2337.exe
    - Source code (zip)
    - Intel.RealSense.unitypackage
- RealSense D435/T265


# 導入

1．[Intel® RealSense™ SDK 2.0 (v2.39.0)](https://github.com/IntelRealSense/librealsense/releases/tag/v2.39.0)から、Intel.RealSense.SDK-WIN10-2.39.0.2337.exeをダウンロードし、インストールします。

||||||
|:--|:--|:--|:--|:--|
|![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/63863/5f32ca24-ec56-662d-0565-dd31ed8aa8be.png)|![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/63863/e4bbc112-d56c-e289-0437-9e27a6e35e03.png)|![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/63863/de7a0784-071a-f560-19bb-79e8e4f4039b.png)|![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/63863/6ee18623-26b7-5aba-7495-b6f3f79541f4.png)|![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/63863/cb07b740-7c0c-5f3d-ebb4-464d4aa9e093.png)|

2．RealSense D435/T265を接続し、Intel RealSense Viewerで確認します。
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Intel RealSense Viewer D435/T265 Tracking Bundle, 30fps<a href="https://twitter.com/hashtag/RealSense?src=hash&amp;ref_src=twsrc%5Etfw">#RealSense</a> <a href="https://t.co/KnRHSNV6zH">pic.twitter.com/KnRHSNV6zH</a></p>&mdash; 藤本賢志(ガチ本)@pixivFANBOXはじめました (@sotongshi) <a href="https://twitter.com/sotongshi/status/1324970203499819008?ref_src=twsrc%5Etfw">November 7, 2020</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

3．[Intel® RealSense™ SDK 2.0 (v2.39.0)](https://github.com/IntelRealSense/librealsense/releases/tag/v2.39.0)からSource code(zip)をダウンロードし、librealsense-2.39.0\wrappers\unityをUnityHubで開きます。

4．Unityのバージョンは2017.4.13f1みたいなので、インストールします。
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/63863/85317e6d-cef7-debc-8276-650a40901027.png)

5．[Unityダウンロードアーカイブ](https://unity3d.com/jp/get-unity/download/archive
)からUnity2017.4.13f1をUnityHubで開き、追加しましょう。![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/63863/e1fdbd63-20ed-5a9b-1042-4d869d85e377.png)

6．Unity2017.4.13f1でサンプルプロジェクトを開きます。

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/63863/5f4bfc2a-fd46-0c90-b926-1e64d225a8e8.png)

7．[Intel® RealSense™ SDK 2.0 (v2.39.0)](https://github.com/IntelRealSense/librealsense/releases/tag/v2.39.0)からIntel.RealSense.unitypackageをダウンロードし、UnityのAssets->Import Package->Custom Packageからインポートします。

8．StartHereシーンを開き、再生ボタンを押してサンプルを実行してみましょう！

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/63863/2153c12d-4479-e502-146e-4eb95cb0fd23.png)

# サンプル実行動画
## SLAM (Pose)
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Intel RealSense T265, SLAM (Pose), Unity<a href="https://twitter.com/hashtag/RealSense?src=hash&amp;ref_src=twsrc%5Etfw">#RealSense</a> <a href="https://twitter.com/hashtag/SLAM?src=hash&amp;ref_src=twsrc%5Etfw">#SLAM</a> <a href="https://twitter.com/hashtag/Unity?src=hash&amp;ref_src=twsrc%5Etfw">#Unity</a> <a href="https://t.co/DxX4XuCZ5C">pic.twitter.com/DxX4XuCZ5C</a></p>&mdash; 藤本賢志(ガチ本)@pixivFANBOXはじめました (@sotongshi) <a href="https://twitter.com/sotongshi/status/1324976324570542080?ref_src=twsrc%5Etfw">November 7, 2020</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

## AR Background (Depth & Color)
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Intel RealSense, AR Background (Depth &amp; Color), Unity<a href="https://twitter.com/hashtag/RealSense?src=hash&amp;ref_src=twsrc%5Etfw">#RealSense</a> <a href="https://twitter.com/hashtag/Unity?src=hash&amp;ref_src=twsrc%5Etfw">#Unity</a> <a href="https://twitter.com/hashtag/AR?src=hash&amp;ref_src=twsrc%5Etfw">#AR</a> <a href="https://t.co/oKpjdHW8Na">pic.twitter.com/oKpjdHW8Na</a></p>&mdash; 藤本賢志(ガチ本)@pixivFANBOXはじめました (@sotongshi) <a href="https://twitter.com/sotongshi/status/1324979381882638336?ref_src=twsrc%5Etfw">November 7, 2020</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

## Depth Segmentation (Depth & Color)
<blockquote class="twitter-tweet"><p lang="ro" dir="ltr">Intel RealSense, Depth Segmentation (Depth &amp; Color), Unity<a href="https://twitter.com/hashtag/RealSense?src=hash&amp;ref_src=twsrc%5Etfw">#RealSense</a> <a href="https://twitter.com/hashtag/Segmentation?src=hash&amp;ref_src=twsrc%5Etfw">#Segmentation</a> <a href="https://twitter.com/hashtag/Unity?src=hash&amp;ref_src=twsrc%5Etfw">#Unity</a> <a href="https://t.co/NfrdRrzbI7">pic.twitter.com/NfrdRrzbI7</a></p>&mdash; 藤本賢志(ガチ本)@pixivFANBOXはじめました (@sotongshi) <a href="https://twitter.com/sotongshi/status/1324981018219065345?ref_src=twsrc%5Etfw">November 7, 2020</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

## Alignment Sample (Depth & Color)

<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Intel RealSense, Alignment Sample (Depth &amp; Color), Unity<a href="https://twitter.com/hashtag/RealSense?src=hash&amp;ref_src=twsrc%5Etfw">#RealSense</a> <a href="https://twitter.com/hashtag/Alignment?src=hash&amp;ref_src=twsrc%5Etfw">#Alignment</a> <a href="https://twitter.com/hashtag/Unity?src=hash&amp;ref_src=twsrc%5Etfw">#Unity</a> <a href="https://t.co/K5C0fq0kMx">pic.twitter.com/K5C0fq0kMx</a></p>&mdash; 藤本賢志(ガチ本)@pixivFANBOXはじめました (@sotongshi) <a href="https://twitter.com/sotongshi/status/1324982853596164096?ref_src=twsrc%5Etfw">November 7, 2020</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

なんかVJに使えそうな
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Alignment Sample, Flag<a href="https://twitter.com/hashtag/RealSense?src=hash&amp;ref_src=twsrc%5Etfw">#RealSense</a> <a href="https://twitter.com/hashtag/Unity?src=hash&amp;ref_src=twsrc%5Etfw">#Unity</a> <a href="https://t.co/D0So124tIA">pic.twitter.com/D0So124tIA</a></p>&mdash; 藤本賢志(ガチ本)@pixivFANBOXはじめました (@sotongshi) <a href="https://twitter.com/sotongshi/status/1324983046521585665?ref_src=twsrc%5Etfw">November 7, 2020</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

## Point Cloud Sample (Color)
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Intel RealSense, Point Cloud Sample (Color), Unity<a href="https://twitter.com/hashtag/RealSense?src=hash&amp;ref_src=twsrc%5Etfw">#RealSense</a> <a href="https://twitter.com/hashtag/Unity?src=hash&amp;ref_src=twsrc%5Etfw">#Unity</a> <a href="https://twitter.com/hashtag/PointCloud?src=hash&amp;ref_src=twsrc%5Etfw">#PointCloud</a> <a href="https://t.co/631nj6z7D6">pic.twitter.com/631nj6z7D6</a></p>&mdash; 藤本賢志(ガチ本)@pixivFANBOXはじめました (@sotongshi) <a href="https://twitter.com/sotongshi/status/1324985036165181440?ref_src=twsrc%5Etfw">November 7, 2020</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

## Point Cloud Processing Blocks (Depth)
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Intel RealSense, Point Cloud Processing Blocks (Depth), Unity<a href="https://twitter.com/hashtag/RealSense?src=hash&amp;ref_src=twsrc%5Etfw">#RealSense</a> <a href="https://twitter.com/hashtag/Unity?src=hash&amp;ref_src=twsrc%5Etfw">#Unity</a> <a href="https://twitter.com/hashtag/PointCloud?src=hash&amp;ref_src=twsrc%5Etfw">#PointCloud</a> <a href="https://t.co/DzqZ8GxAKb">pic.twitter.com/DzqZ8GxAKb</a></p>&mdash; 藤本賢志(ガチ本)@pixivFANBOXはじめました (@sotongshi) <a href="https://twitter.com/sotongshi/status/1324985510339641344?ref_src=twsrc%5Etfw">November 7, 2020</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

## UI Image Sample (Depth & IR)
<blockquote class="twitter-tweet"><p lang="ro" dir="ltr">Intel RealSense, UI Image Sample (Depth &amp; IR), Unity<a href="https://twitter.com/hashtag/RealSense?src=hash&amp;ref_src=twsrc%5Etfw">#RealSense</a> <a href="https://twitter.com/hashtag/Unity?src=hash&amp;ref_src=twsrc%5Etfw">#Unity</a> <a href="https://t.co/K05HuwhVes">pic.twitter.com/K05HuwhVes</a></p>&mdash; 藤本賢志(ガチ本)@pixivFANBOXはじめました (@sotongshi) <a href="https://twitter.com/sotongshi/status/1324985944689111040?ref_src=twsrc%5Etfw">November 7, 2020</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

## UI Image Sample (Depth & Color)
<blockquote class="twitter-tweet"><p lang="ro" dir="ltr">Intel RealSense, UI Image Sample (Depth &amp; Color), Unity<a href="https://twitter.com/hashtag/RealSense?src=hash&amp;ref_src=twsrc%5Etfw">#RealSense</a> <a href="https://twitter.com/hashtag/Unity?src=hash&amp;ref_src=twsrc%5Etfw">#Unity</a> <a href="https://t.co/oRzlbZvN3b">pic.twitter.com/oRzlbZvN3b</a></p>&mdash; 藤本賢志(ガチ本)@pixivFANBOXはじめました (@sotongshi) <a href="https://twitter.com/sotongshi/status/1324986537906380801?ref_src=twsrc%5Etfw">November 7, 2020</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

お疲れ様でした。