Failed to initialize Vuforia Engine - unity3d

Im trying to embed my vuforia project to my flutter app,
Everything runs fine at first open, but idk why everytime i open the app again, the error pop up on the unity screen:
The problem i could specify is, Vuforia try check / get / something about the Camera Permission, since the first open it ask for Camera Permission, it run good, but second, while the permission already granted, the error show up.
I tried to ungrant the permission, open app again, it work again because it request for the permission.
Any suggestions of what and where the thing must i change? It's quite annoying to ungrant the permission everytime i open the app.
Regards, Slim!
Vuforia error

This happens to me when I have Vuforia running in the Editor (playing a game) and changing some code while it's running. Then, when coming back into Unity, it stops playing because of recompiling. But that apparently causes Vuforia to crash, and it will come up with that error screen on the next play.
My workaround is to stop a running game in Unity before changing (saving) any code, so recompiling doesn't crash Vuforia.

Related

Hololens2 with MRTK 2.6.1 Losing Head Pose after device Sleep

On Hololens2 if the device goes to sleep (or press the power button off then on) and resume my app I lose head pose tracking.
I'm using MRTK 2.6.1 with Unity 2019.4.18f and the XR SDK approach.
I'm testing using the instructions here https://learn.microsoft.com/en-us/windows/mixed-reality/develop/unity/tutorials/mr-learning-base-02?tabs=winxr
I'm using the DefaultHololens2XRSDKConfiguration profile.
Everything is generally fine, but after I put the headset down and it goes to sleep, or i press the power button off and on. Then launch my app again (it's still running in the background), then the head tracking is lost.
The wrist tap menu is still tracked fine. The app seems to be getting hand tracking fine (but is offset becaues the head pose position is stuck.
If i close the app and open again tracking is fine.
No errors show up in the Unity debug log (even with verbose MRTK logging on).
Any ideas? Or anyone else able to test this with similar setup?
I might try the Open XR approach next.
Cheers
This is a known issue with a fix in development still, it is recommended to keep checking the Unity releases for 2019 with getting on latest LTS for now.
This issue is fixed in Windows XR SDK 2.8 which requires Unity 2019.4.25 or later.

Unity3D gives hundrends of errors when building the game

so my Unity worked fine until now, last time I built the game was yesterday and everything worked fine. Since yesterday the only thing that I did is that I changed some colliders and removed facebook gamecenter plugin. Now, when I try to play the game, everything is fine, but when I try to build it, it starts giving me 250 errors in total.
The last error always says :
"Error building Player because scripts had compiler errors"
Others error are connected to the standard assets.
Screenshots:
For some reason this happens. There a few options of fixing it, but the easiest one to simply re-install Unity.
PS: You wont lose any data.

Running google-vr unity daydream app on google pixel

Im trying to run the sample app provided in the daydream page on the google pixel phone.
1) I chnaged the build settings to android.
2) Went to player settings enabled Virtual reality support and selected google daydream as the platform.
3) I changed the Minumum API to API level 24.
4) I added the folder containing my adb to the path variable in windows.
5) I also set the path of the android SDk.
6) I enabled USB debuggin on Pixel
However when I run my app , I get the following errors:
Device daydream not supported in Editor Mode. Please run on target device.
And..
Failed to read from controller emulator app event socket.
Verify that the controller emulator app is running.
build the apk and start it on your device. build and play requires adb.
As I suppouse, you want to DEBUG your Daydream app on your Programming Environment (Unity in this case).
Note:This solution allows you to debug on your PC but you'll need one Pixel Phone connected to your PC, and one Daydream Controller.
First of all I recommend you to download the samples provided by Google on Github if you have not done it yet:
https://github.com/googlevr/gvr-unity-sdk/releases
When you load any scene you'll see that the Daydream basic set is composed for a hierarchy like:
The two selected components are key for your porpouse cause if you want to debug Daydream from your PC you'll need to "link" your daydream controller with InstantPreview App. Instant preview will downloaded instantly on your phone if you got in your scene the "GvrInstantPreviewMain".
InstanPreview Google Info: https://developers.google.com/vr/develop/unity/instant-preview
When the app has been opened, can happen 3 things on your pixel phone:
Everything works as it should.
Daydream Instant Preview infom to correct the device by USB.
Kind of Grey screen with some text.
If you're on 2.
This seems to happen when your Unity Project is desynchronized from your phone and you'll see something like:
Close InstantPreviewApplication on your phone, close your unity project (remember to save your progress), and open again your unity project. That has almost always solved me.
If you're on 3.
This seems to happens when instan preview is waiting for Unity Play Mode.
You only need to press Play on you Unity Poject.
Remember to press (and mantain) synchronize button on your Daydream controller if you can move the headset camera but can't find your controller reticle.
This works for me.
I also append my own Unity project with this scheme that works bought for Daydream and GearVR in case helps someone else to test my solution:
https://github.com/ls29322/VR_GalleryApp

Google Tango: Failer to connect to tango service

so i was developing with unity and google tango. After pushing my application to the tablet it crashed with the message: "Failer to connect to tango service".
After rebooting the tablet i tried to start an application which was already on the tablet and it worked in the past. But also this application crashed. After rebooting again another application also crashed.
It seems as no application is able to start. I dont know why. I googled but i could not find any information about this. There were 2 pages on stack overflow but they got removed, so i get an "page not found" page.
Anyone was an idea how to fix this or what the problem could be ?
Thanks
for someone who maybe was the same prolem in the future:
solution for me was just installing the system update. It seems that the tango service is not working when the device has downloaded the updates but not installed it.
I ran into this problem when running the Depth Perception Tutorial. It can be one of two problems 1. the camera has crashed and you need to reset the device or 2. You need to download and install the latest Project Tango system update. You can do this by dragging your finger down the screen from the top left on the Project Tango device and applying the Tango Update. It will take a few minutes. You should not even have to reboot. Just Build and Run again. Worked for me.
The are multiple causes:
As mentioned before - the Tango Framework on the device is out of date + Tango core app is out of date.
Wrong implementation of Tango object's lifecycle. Tango object has its own strict life-cycle and if you do not implement it right it causes the Tango to malfunction.
Try to use Tango apps in order to calibrate the device

GameKit authenticateWithCompletionHandler stuck

I'm having a classic everything-worked-yesterday-nothing-works-today kinda day.
I set up Game Center yesterday. Managed to log in, get leaderboards, get achievements etc.
Today, everything stopped working. authenticateWithCompletionHandler doesn't call the completion handler, even for an error.
I tried several iPhones, rebooting them, rebooting the mac, deleting and installing the app and more (all hints gathered from the internet).
I figured it was a temporary Game Center Sandbox issue, but then noticed it was working fine on the simulator. So I retargeted my own code, had another reboot, and now it doesn't even work on the simulator!
When I try to open the Game Center App it's in "Loading..." state, and doesn't get out of it.
What am I doing wrong? What happened between everything was working, to nothing is?
Log out of your current GameCenter account in your iphone.. Install the app again and launch the app.. Note that it should prompt you to sign in.. If not, check your codes to ensure that it calls the function to authenticate the user is being called..