Leapmotionのサンプルを開くまで

前回Leapmotionを触った時は2019年でLeapmotionのSDKバージョンは4.0
UnityパッケージはLeap_Motion_Interaction_Engine_1.2.0 だった。

2021/09時点のLeapmotionを触る

https://developer.leapmotion.com/

アクセスしてログインしてSDKをダウンロード
現在:Ver4.1.0

解凍してインストール

Leap_Motion_Installer_v4-2020-release-updates_public_win_x64_4.1.0+52211_ah1889

 

https://developer.leapmotion.com/unity

UnityパッケージをDL
現在:Unity Modules Package 4.8.0

要件はUnity 2019 LTS

解凍すると3つのUnityパッケージがあるので上から順にインポートする

Core.unitypackage
Interaction Engine.unitypackage
Hands.unitypackage

動作検証のために2020.3.18にパッケージインポートしたらエラー出た。

Assets\Plugins\LeapMotion\Core\Editor\Hotkeys.cs(24,91): error CS0619: ‘SelectionMode.OnlyUserModifiable’ is obsolete: ”OnlyUserModifiable’ is obsolete. Use ‘Editable’ instead. (UnityUpgradeable) -> Editable’

Hotkeys.csで3か所エラーが出ているので
| SelectionMode.OnlyUserModifiable
を削除すると解決した。

 

Exampleを実行すると出てくるこの画面

今までスルーしてたけどちゃんと読んでみる

Leap Rig Upgrader

If you have upgraded from Core version 4.3.4 or earlier to Core version 4.4 or later, you can check the currently-open scene for out-of-date rigs. Instances of older Leap Rig prefabs can be automatically upgraded to match the updated rig, which is much simpler.
Coreバージョン4.3.4以前からCoreバージョン4.4以降にアップグレードした場合、現在開いているシーンに古くなったリグがないかどうかをチェックすることができます。古いLeap Rigプレハブのインスタンスは、更新されたリグに合わせて自動的にアップグレードすることができ、よりシンプルになります。
Scan Current Sceneボタンを押すと現在のシーンをスキャンする

Your gravity magnitude is -9.81 which is stronger than the recommended value of -4.905! 
あなたの重力の大きさは-9.81で、推奨値の-4.905よりも大きいです。
Auto-fix:自動修正 Ignore:無視

Go to Edit/Project Settings/Physics to change the magnitude.
Your fixed timestep is 0.02, which is slower than the recommended value of 0.0111.
Edit/Project Settings/Physicsでマグニチュードを変更します。
固定タイムステップは0.02で、推奨値の0.0111よりも遅くなっています。
Auto-fix:自動修正 Ignore:無視

Go to Edit/Project Settings/Time to change the fixed timestep.
Editor is currently in play-mode, so any project setting changes will be reverted upon returning to edit-mode, You should return to edit-mode if you want auto-fixes to stick
編集/プロジェクト設定/時間」で固定のタイムステップを変更します。
エディターは現在プレイモードなので、プロジェクトの設定を変更しても、編集モードに戻ると元に戻されます。

はい。
Auto-fixでOKですね

これでサンプル実行できる

なんか変わってるかなって思ったけど全然変わってなかった。

 

関連記事




コメントを残す

※コメントは承認後に表示されます。
 コメントを公開されたくない場合、名前の後に「:非公開」とつけてください。