LoginSignup
0
0

More than 5 years have passed since last update.

Unity: c# delegateというかAction? GearVR タッチパッドメモ

Last updated at Posted at 2017-07-12

GearVRのタッチパッド

使ってみようと思い、以下のサイトを参考に、
https://framesynthesis.jp/tech/unity/gearvr/

VRsamplesを確認してみた。
https://www.assetstore.unity3d.com/en/#!/content/51519

確認したスクリプトは
VRStandardAssets/Scripts/VRInput.cs
VRSampleScenes/Scripts/Examples/ ExampleTouchpad.cs

調べているとActionというものに行き当たった。
なんか関数代入してるぞ…?

以下のサイトで確認。
http://kan-kikuchi.hatenablog.com/entry/Delegate

どうやら関数を入れられる変数のようなもので、ほかのクラスに「この関数つかってー」と受け渡せるらしい。
いちいち呼び出さなくていいのは楽だし、ほかの制作時にコードを使いまわすのが楽そう。

0
0
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
0
0