Giter Club home page Giter Club logo

immersal-server-localizer's Introduction

Immersal Server Localizer

Run EditMode Test

About

ImmersalのREST APIを使用して空間の位置合わせを行うUnity Packageです。

ほぼ自分用に作っちゃったので変な仕様があるかもしれませんがすみません。

Tested Environments

  • Unity 2020.3.11f
  • UniTask 2.2.5
  • ARFoundation 4.1.7
  • Keijiro/Pcx
  • Pixel 4a 5G
  • Windows 10 Home

Install

このパッケージは以下のパッケージに依存していますので、インストールをしてください。

  • ARFoundation 4.1.7
  • UniTask 2.2.5

Immersal Server Localizerパッケージをインストールするためには、 PackageManagerの「Add package from git URL...」をクリックし、 https://github.com/drumath2237/Immersal-Server-Localizer.git?path=/Packages/ImmersalServerLocalizerとします。

もしくはmanifest.jsonを直接編集して、

{
  "dependency":{
    "com.drumath2237.immersal-server-localizer": "https://github.com/drumath2237/Immersal-Server-Localizer.git?path=/Packages/ImmersalServerLocalizer",
  }
}

を追記します。

Usage

  1. 適当なディレクトリにCreateメニューからImmersal REST LocalizerConfigurationScriptableObjectでConfigファイルを作成し、Immersal Developer TokenとマップのID配列を入力してください。
  2. ARFoundationを使ってARシーンを構成します。
  3. シーンを作成してImmersalという空のオブジェクトにImmersal Server Localizerコンポーネントをアタッチします。
  4. LocalizerコンポーネントのConfigurationに、先ほど作成したImmersalのコンフィグファイルをアタッチします。
  5. シーンに適当にTextMeshProのテキストオブジェクトを作成し、Log Textにアタッチします。
  6. シーンにAR Spaceという空のオブジェクトを作成し、ImmersalServerLocalizerコンポーネントのAR Spaceにアタッチします。
  7. CameraManagerおよびCameraTransformにAR Session Originの子オブジェクトであるARCameraをアタッチします。
  8. シーンに適当にボタンを配置し、ClickイベントのCallbackにLocalizerコンポーネントのLocalize()メソッドを指定します
  9. Androidビルドを実行し、位置合わせを行います。

シーン中のAR Space以下に配置したオブジェクトが 位置合わせに適用されますので、お好みでImmersalのply点群などを配置してみてください。

このスクリプトではunsafeなコードが存在しますので、 Project SettingsからAllow Unsafeを有効にしてください。

Cahnge Log

  • 2021/9/30
    • TextMeshProへの依存を消去しました
    • XRCpuImage->Texture2Dへの変換をasyncメソッドに移行できました
      • これによりunsafeなコードを使う必要がなくなりました
    • カメラのtransformをARCameraManagerのついたオブジェクトから取得するようにしました

Contact

何かございましたら、にー兄さんのTwitterまでよろしくお願いいたします。

immersal-server-localizer's People

Contributors

drumath2237 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

confence

immersal-server-localizer's Issues

TextMeshProへの依存を辞めたい

TextMeshPro、普通にインポートしていないプロジェクトもあるし
ログ用出力として使っているだけなので依存を辞めたいなぁと思っている

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.