Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by b4th · Oct 04, 2016 at 10:18 AM · androidvrpreviewbeta

Unity Daydream Technical Preview lacks controller support and crashes using Google VR SDK

I'm trying to develop a Google Daydream app with Controller support using the Unity Daydream Technical Preview build (UDTP). Unfortunately, UDTP does not appear to have native support for the Daydream controller, so I have no choice but to include the Google VR SDK to establish a connection.

The problem is whenever I attempt to build & run a Daydream app with Unity's 'Virtual Reality Support' enabled AND the Google VR SDK included, the app crashes at runtime. I presume that the plugins provided by the Google VR SDK are conflicting with UDTP's native VR support. I see that the app and the controller emulator establish a connection to eachother for a split-second, and then the app crashes.

I believe my best option might be to rebuild the Google VR SDK's plugin (libgvrunity) from source, removing all references to VR rendering and only keeping references to the controller, but the source for this plugin does not appear to be publicly available.

I'm going to try building a new plugin using the Google VR Android SDK, but if anybody else has faced this issue and can provide any support or direction, it would be greatly appreciated.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by b4th · Oct 04, 2016 at 08:39 PM

I think I've now found a solution to the issue.

The GVR Android SDK (https://github.com/googlevr/gvr-android-sdk) contains an AAR file to link to the controller (libraries/controller/controller.aar). I was able to decompile this module in Android studio. The AAR module doesn't cover all of the controller's functionality (for instance, Accelerometer support), but they cover more than enough for our needs for this application. I wrote one little missing class in java (a listener), built this into an additional AAR module in Android Studio, and then loaded the two AAR files (controller.aar and controllerlistener.aar) into the Unity project. This gave me all I needed to create a few bridge classes in C# to allow Unity to talk to the java module classes to talk to the controller. Modify the GVR Unity SDK so that the ControllerProviderFactory creates the new AndroidJavaControllerProvider instead of the old AndroidNativeControlerProvider, et Voilá, the GvrControllerMain prefab works!

All the code I've written can be found at the following Gist:

https://gist.github.com/anonymous/ac8c76641f7b9b2608de50aae262644e#

And if you can really be bothered to jump through all these hoops, kudos!

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Loading 8192x8192 textures at runtime on android 0 Answers

Many problems using the new Cardboard unity3D integration 0 Answers

[BUG] Can't use postprocessing with single-pass stereo rendering enabled (5.6, GearVR) 2 Answers

Google VR had a fatal issue while loading 3 Answers

Integrate VR scene made in unity into android studio 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges