Daydream Controller Emulator

µ¥À̵帲 ÄÁÆ®·Ñ·¯°¡ ¾øÀ»¶§´Â DayDream ¿¡¹Ä·¹ÀÌÅÍ·Î Á¦¾î ÇÒ¼ö ÀÖ´Ù.
¿ÍÀÌÆÄÀÌ°¡ µÇ´Â ¾Èµå·ÎÀÌµå ±â±â·Î ÄÁÆ®·Ñ·¯¸¦ ¿¡¹Ä·¹ÀÌ¼Ç ÇÒ¼ö ÀÖ´Ù.
Wifi·Î µ¥À̵帲 ÄÁÆ®·Ñ·¯¸¦ ¿¡¹Ä·¹ÀÌ¼Ç ÇÏ´Â ¹æ¹ý¿¡ ´ëÇؼ­ ¾Ë¾Æº¸ÀÚ.

¿¡¹Ä·¹ÀÌÅÍ ´Ù¿î·Îµå:
https://github.com/googlevr/gvr-android-sdk/tree/master/apks/¿¡ °¡¸é controller_emulator.apk ÆÄÀÏÀ» ¼³Ä¡ ÇÑ´Ù.

¿¡¹Ä·¹ÀÌÅÍ APK ÆÄÀÏÀ» ¼³Ä¡ ÇÏ¸é ´ÙÀ½ÀÇ ¾ÆÀÌÄÜÀÌ »ý±ä´Ù.



Wifi¸¦ ¿¡¹Ä·¹ÀÌÅÍ·Î »ç¿ë ÇÒ·Á¸é À¯´ÏƼ¿¡¼­ ¸î°¡Áö ¼öÁ¤ÇÒ°ÍÀÌ ÀÖ´Ù.

1. ¿¡¹Ä·¹ÀÌ¼Ç ÄÁÆ®·Ñ·¯¸¦ ½ÇÇàÇϸé IP¸¦ È®ÀÎ ÇÒ¼ö ÀÖ´Ù.



2. GvrCotnrollerMainÀÇ GvrController ÄÄÆ÷³ÍÆ®¿¡¼­ "Emulator Connection Mode"¸¦ "WIFI"·Î ¼³Á¤ÇÑ´Ù.



3.  EmulatorConfig.cs ÆÄÀÏÀÇ WIFI_SERVER_IP¸¦ ¿¡¹Ä·¹ÀÌÅÍ ÄÁÆ®·Ñ·¯¿¡ Ç¥½ÃµÇ´Â IP·Î ¼öÁ¤ÇÑ´Ù.

Assets/GoogleVR/Scripts/Controller/Internal/Emulator/EmulatorConfig.cs
// IP address of the phone, when connected to the PC via WiFi.
public static readonly string WIFI_SERVER_IP = "192.168.219.102";

4. ControllerProviderFactory.cs ÆÄÀÏÀÇ CreateControllerProvider ÇÔ¼ö¿¡¼­ ¿¡¹Ä·¹ÀÌÅÍ ÇÁ·Î¹ÙÀÌ´õ¸¦ ¸¸µç´Ù.

Assets/GoogleVR/Scripts/Controller/Internal/ControllerProviderFactory.cs
    static internal IControllerProvider CreateControllerProvider(GvrController owner) {
#if UNITY_EDITOR || UNITY_STANDALONE || UNITY_IOS
        // SystemInfo.graphicsDeviceID is zero for Unity 5.3.3.
        if (SystemInfo.graphicsDeviceID == 0) {
            // Running headless.  Use the dummy provider.
            Debug.Log("No controller support when running headless.");
            return new DummyControllerProvider();
      }
      // Use the Controller Emulator.
      return new EmulatorControllerProvider(owner.emulatorConnectionMode, owner.enableGyro,
          owner.enableAccel);

#elif UNITY_ANDROID
      return new EmulatorControllerProvider(owner.emulatorConnectionMode, owner.enableGyro,
          owner.enableAccel);

     // Use the GVR C API.
     //return new AndroidNativeControllerProvider(owner.enableGyro, owner.enableAccel);
#endif

¿¡¹Ä·¹ÀÌÅ͸¦ ½ÇÇàÇϸé "Waiting for connection"ÀÌ ¶á´Ù.
ÇÁ·Î±×·¥°ú wifi ¿¬°áÀÌ ¼º°øÇϸé "Connected(TCP/IP)"·Î ¸Þ¼¼Áö°¡ ¹Ù²ï´Ù.

ÂüÁ¶)
https://developers.google.com/vr/daydream/controller-emulator
http://vr-cto.hateblo.jp/entry/2016/06/07/073000