LoginSignup
1
1

More than 5 years have passed since last update.

[Hololens] Unityエディタ上でのビルドエラー error CS1929: 'SpatialInteractionController' does not contain a definition for 'TryGetRenderableModelAsync'

Posted at

HoloLensアプリを作ってて、別のPCにUnityプロジェクト一式持ってきてビルドしたらエラーになって困った話。Unityのバージョンも同じなのに・・・なぜ?と思っていたら、Windows SDKのバージョンが違ってた件。

現象

PC-Aではうまくビルドできるけど、同じソースがPC-Bではビルドエラーになる。
Unityのバージョンは同じ。(Unity 2017.2.0f3)

エラー内容

error CS1929: 'SpatialInteractionController' does not contain a definition for 'TryGetRenderableModelAsync' and the best extension method overload 'InteractionSourceExtensions.TryGetRenderableModelAsync(InteractionSource)' requires a receiver of type 'InteractionSource'

何かが足りてないよね、というのはすぐに想像ついた。

原因

Unityのバージョンは同じ(2017.2.0f3)だったけど、SDKのバージョンが違ってた。
unityerror.jpg

どっちのPCも「Latest installed」って表示されてたので、なかなか気づけなかった。。。
プルダウンあけてみると、候補に出てくるバージョンが違ってた。

解決策

Windows SDKをどうやって上げようかと思ってたら、Visual Studioのバージョンが違うことに気づいた。
- PC-A(ビルド通る方):Visual Studio Commnunity 2017 Version 15.5.4
- PC-B(エラーの方) :Visual Studio Commnunity 2017 Version 15.1
  → 最新版(15.5.6)にアップデートしたら、SDKのバージョンも揃った。ビルドも通った。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1