简体   繁体   中英

Vuforia 6.2.2 Unity 5.4.4 Camera does not work

Everyone.

Vuforia Camera does not work, but only black screen on Android 6.0+ versions.

Vuforia Version is 6.2.2 and Unity version is 5.4.4

But vuforia camera works on less than android 5.0

How can I fix this issues?

I hope you to teach me about this.

This is an interesting problem I have and there is an unacceptable temporary fix I am using while testing this system out. For the iPhone 7, to get past this suspend the app and then return to it. After about 2 seconds the camera will work. I am guessing it will work similar for android. I will update with a better fix if I come by a real fix after my testing if I decide to use this system.

Edit:

Short answer: Delete the meta data for any pre-existing custom camera controller script. If you are using your own camera controller you need to disable the vuforia one and delete the meta for that. You are basically hijacking the camera feed after it starts.

long: I began this application by building out my own system and to test vuforia I disabled these items (like the camera feed). I went through the logs and saw that even with these items disabled the camera feed was still running and this feed started AFTER the vuforia camera so basically my own start() methods (even though they were disabled) were hijacking the camera from vuforia. It turns out that my meta data for my camera controller script was still poised to run the script even though everything was disabled. After deleting my camera controller script meta data it worked fine. You can also just delete the camera controller and it will delete the meta. By camera controller I mean my custom written camera controller that was built before I added in vuforia. This is a hard to find fix because it works fine in unity, but not when you build out to a device. The meta doesn't seem to update for the device, just the unity engine.

If you are using the vuforia camera make sure you either use the vuforia plane that comes as a child of the camera or delete the meta data to whatever camera script you wrote. You should get camera feed in a new empty project just by dropping in the vuforia camera, there is no need to build your own script and if you do, make sure one isn't overriding the other like mine was.

If you want to simply test to make sure it isn't your device or code create a NEW empty unity project, import vuforia (no need to import the database, just the sdk) and then drop the vuforia camera into the project and test it. Don't add anything extra or do any image recognition. If this works, it's your code somewhere.

I am using Vuforia 6.2.10, Unity 5.4.4.f(64 bit) and a Nexus 7 Android 6. I had the same issue where the camera was black. I started over, adding one component at a time. The AR Camera alone worked fine. Adding a Target Image also worked. I added a plane and image to the TI and the camera failed to work. Setting the image texture type to Sprite 2d and ui seemed to help.

I discovered that by deleting the app from the device and creating a apk file each time it worked.

I am not sure I'd count on Vuforia in the near term.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM