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 /
  • Help Room /
avatar image
1
Question by CameronPenner · Aug 02, 2016 at 02:23 PM · vrdlloculus rift

Why does VR not work the second time I run the project?

My application doesn't run correctly the second time I run it. I've narrowed down the problem to the LeapMotion DLL (I'm using V2 rather than orion because it has some features that aren't in orion anymore). If I remove it, or don't call it at all, the project works just fine. I'm guessing it may be because Unity doesn't unload managed plugins after running the game in the editor. If I close the editor and reload the project, it will work again.

The VR mode seems to not be able to initialize if the LeapMotion driver is already running. I'm using the latest Oculus drivers and the latest V2 Leap motion driver.

Here are some things I've discovered:

  • Having the Leap DLL's in the project doesn't break it on its own, it's only if I call new Leap.Controller();. Then, any times I run the project in the editor after that, the VR will not be able to initialize (but the first time I run the project, it does work, even when I make that call).

  • If I build the project before I run it in the editor, the build will work as many times as I run it. But if I build after I've run the app in the editor, the build will also not work. (This is super weird!)

What I have tried:

  • I know I can't use FreeLibrary(); to release the DLL. Apparently, it's not supported by mono.

  • Re-importing the DLL after running the app. (Right click in the project view and then Reimport) doesn't seem to have an effect.

  • I've tried reimporting the entire project as well. Still no luck.

  • Made sure I called controller.Dispose(); on the LeapMotion controller.

I expect if there is some way I could unload the DLL (or maybe reset it to its initial state?) after I stop playing in the editor, then it could start fresh every time.

I've made a repo on GitHub with a simple project file: https://github.com/cameronpenner/LeapV2VR

If anyone has some ideas on how I could get this working I would really appreciate it! Thanks for your time.

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

0 Replies

· Add your reply
  • Sort: 

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

80 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Ray from camera not working in VR? 0 Answers

Unity 5.3.1p3 - Viewports on Render Textures are warped when Virtual Reality Supported is enabled. 0 Answers

How to use Oculus Rift with Unity 5.4.0f3 0 Answers

Mechanics in VR? 0 Answers

Unity 5.2 VR Camera Problem 0 Answers


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