Failed to start Vuforia on Unity UWP executable build - unity3d

I'm trying to build a very simple UWP app (for PC Desktop only) with a single image target and camera using Vuforia on Unity.
Everything works fine in the Editor, but after I build and run the app I get the following error on a black screen :
I don't even know where to debug this, as the only log I get is this error and nothing else. I also tried delayed initialization, but this same behavior happens when I manually call VuforiaAppllication.Instance.Initialize(); after it's initialized and before it's started.
Here's my build settings :
I'm using Unity 2020.3.30f1 and Vuforia 10.2.5, the only target SDK installed on my system is 10.0.19041.0 and also, I have Visual Studio 2019 Community installed if that info helps.

Fixed by disabling my laptop's webcam from device manager, and connecting an external USB camera.

Related

Android apps worked in usb debugging but not in android emulator (white screen)

I run "ionic cordova run android" using visual studio code.. but the apps shows white screen in the emulator.. it display properly if using USB debugging.. the device also display properly if install using the apk.. the reason why I want to use emulator because I want to debug "http://10.0.2.2".. this is my emulator setting..
Emulator setting
Things that I have done is as per below
Choose ANGLE (D3D11) for OpenGL ES Renderer at the emulator advance setting
Choose Software - GLES 2.0 graphic for the Emulated Performance during create emulator
Try both R and Q for the system image during create the virtual device
Update the SDK based on the system image set at the emulator
System image selection
Issue
I compile the source code at different laptop (Laptop A) and it manage to display error at the web console using google inspect
it display "newtrustedfunctionforjit fn.bind is not a function"..
Founding
the issue is related to the chrome version 83 and the browser need an upgrade to solve the issue
The emulator is not using a browser (it using web view) hence I cannot update the google version
Solution
download new skin for newer android model into laptop A
download same skin on the laptop B (the laptop that I initially come with this post)
Below is the explanation from GitHub for angular
Explanation about the chrome issue
Below is my new System Image
Release Name S
API Level 31
ABI x86_64
Target Android 12 (Google APIs)
New System Image

Direct deploy from unity to hololens emulator

Is there any way to direct install from unity to hololens emulator ?
I want to hit unity play button and hololens app get install and run on emulator.
Its very hard to for each test build unity project and then run built visual studio project on emulator.
I also used Mixed Reality Portal but it doesn't show real scales, scales are very smaller than hololens device.
You can try the Holographic Emulation feature provided by unity(https://docs.unity3d.com/560/Documentation/Manual/windowsholographic-emulation.html), and download the Holographic Remoting Player from the store in the simulator.
After successfully connecting to your simulator, you can run the Microsoft HoloLens project directly in the Unity editor rather than building and running the game each time you want to see the effects of the changes.

Cannot deploy to HoloLens (error 80004005)

I have freshly installed Unity 2018.3.10 with Visual Studio 2017 (15.9.10). I cannot deploy a bare-bones 3D unity application to HoloLens due to an error in Visual Studio ("DEP0100: Please ensure that target device has developer mode enabled. Could not obtain a developer license on 127.0.0.1 due to error 80004005"). Here are the steps to reproduce:
Create new 3D scene in Unity. Set camera position to 0,0,0 and camera clear color to solid black. Create a red cube in front of the camera with dimensions 0.1x0.1x0.1
Window / Package Manager : remove Ads, Analytics Library, In App Purchasing, TextMesh Pro, Unity Collaborate, because I don't need these
Build settings and Project Settings (Quality and Player Settings) shown in screenshots. Scripting backend = IL2CPP
Unity successfully generates a .sln file
The HoloLens has OS build 10.0.17763.316 . Under Settings/Update & Security / For developers , I set 'Use developer features'=on, 'Enable Device Portal'=on
I don't know if it's necessary, but on my PC, I also do Settings/Update & Security/For developers, select 'Developer mode', 'Enable Device Portal'=on, 'Device discovery'=on
Connect HoloLens to PC via USB cable
Open the .sln file in Visual Studio. Set to Release, x86, Device. Build / Deploy Solution
Compilation is successful, and Visual Studio asks for a PIN, which I get from the HoloLens by opening Settings / Update & Security / For developers / Device Discover / Pair
Visual Studio shows error message: DEP0100: Please ensure that target device has developer mode enabled. Could not obtain a developer license on 127.0.0.1 due to error 80004005
Make sure Developer mode is enabled on the Hololens. You can find this in settings.
If that doesn't work then...
Try reseting the device.
Reseting is annoying but that is the solution found for 'Could not obtain a developer license on 127.0.0.1 due to error 80004005'on the forums:
https://forums.hololens.com/discussion/8964/could-not-obtain-developer-license-for-hololens
Pasting the comment here as those forums will be removed:
"shyykoserhiy ✭ November 2017 I've had the same issue. Tried to run
from two different setups: MacBook Pro 2016 with touch bar (windows 10
Pro in Bootcamp) and Surface Pro 4. Same error on two different
machines. So I've though that it might be a problem with the HoloLens
itself. After Resetting the HoloLens from Settings> Update and
Security> Reset everything started to work just fine. This is the only
solution that've worked for me."
It is also mentioned in the unity forums:
https://forum.unity.com/threads/could-not-obtain-developer-license-for-hololens.500808/
"billyjacobs So I did some searching and found that one way to solve
the problem is to reset your hololens device. It will have the latest
version of the device software after you reset it. I was hesitant
against doing this at first but it worked like a charm."

"Error DEP6957 Failed to connect to device using Universal Authentication" when deploying Unity app to Hololens emulator

I've been working in a Unity app with Hololens emulator in Visual Studio 2017 in Windows Pro, and it was working great until last night where I started to get the following issue every time that I try to deploy my application into the Hololens emulator:
Error DEP6957 : Failed to connect to device '[device_ip]' using Universal Authentication. Please verify the correct remote authentication mode is specified in the project debug settings.
I've tried to do the following things without success:
Clean/rebuild solution
Checked 'uninstall/install' checkbox in the UWP project settings
Deleted Hololens virtual machine
Uncheck/check Hyper-v feature (and restart PC after each try)
Restarted computer
No luck. Sometimes, I am able to make it work, but after 30 seconds to 1 minute, the hololens emulator gets frozen and then it closes itself; again, this was working fine until last night, and I have not installed anything different, unless an automatic windows update did something. This happens with all the applications, and they run just fine in the Unity player.
I would appreciate your help on this, I just don't think the only solution is to uninstall/install Visual studio and all its components, it makes no sense, since everything was ok.
Thank you.
UPDATE
I've just noticed that if I connect the laptop to the internet by using an ethernet cable, it works, it only fails in WIFI, have you seen that before? I also have another UWP that I deploy remotely to a raspberry and it also works only with ethernet, but both of them were used to work in wifi? any idea?

Can I use Unity remote with a Android emulator instead of Android phone?

Unity Remote is good app. It allows to connect with Unity while you are running your project in Play mode from the editor.
But what if I want to test game but I don't have an Android phone? Yes, it happens ¯\_(ツ)_/¯
I have a great Android emulator: Nox APP Player
The emulator doesn't have USB, so it just show me standsrt text Connect device with a USB cable ..... bla bla bla ...Game in the Unity Editor is running...emulator doesn't display the game.
Can I somehow connect this emulator to unity using Unity Remote? Or using something else? How?
Not sure if you still need the solution for this problem, but I think I should leave an solution for those who come later.
You can connect Nox with Unity via UnityRemote (I'm using Unity Remote 5) with the adb of Nox. Here the steps :
Rename your adb.exe to other (i.e adb_origin.exe). It's normally located at SDK folder\platform-tools
Go to Nox installation folder\bin, looking for nox_adb.exe, copy it to the location of your origin adb.exe
Rename nox_adb.exe to adb.exe
Open cmd and enter : adb.exe connect localhost:62001 and you will see "already connected to localhost:62001". If not, you can try replace localhost by 127.0.0.1
Then apply steps 3 → 7 of #Alexey
At the Resolution dropdown, you can choose Normal (default is Downsize) to have better image quality on Nox
Note that after all of this, you should restore the origin adb.exe for later use.
Here is my result picture :
Hope this will be useful.
Took from https://gamedev.stackexchange.com/a/126192/81175
I was able to run Unity Remote 4 on standard Android emulator.
Final effect looks something like
Whole procedure:
Install Unity and open some Unity tutorial project (2D Roguelike tutorial in my case)
Install JDK, Android SDK and setup Android emulator using AVD Manager.
My emulator config looks like this:
Important note: CPU/ABI option seems to be one of most important ones(Intel x86 emulator didn't work for me)
Then install Unity Remote 4 from apk file to emulator using command: adb.exe install path/to/apk (Windows) or adb install path/to/apk (Linux/Mac).
Then in Edit → Preferences → External Tools — set paths to Android SDK and JDK
In Edit → Project Settings → Editor in section Unity Remote select: Any Android Device.
In File → Build Settings — add Your scenes and switch platform to Android.
Press PLAY in Unity while Android Emulator is running and Unity Remote 4 app is opened.
Tip: At first I needed to restart unity after all changes, because it wasn't starting game on emulator. Now it runs everytime.
However, it works for AVD Manager emulators. I've tried them too, before I asked the question, and they didn't work because of CPU/ABI Intel x86 as #Axxxon said...now it works with CPU - ARM armeabi...
Unfortunately NOX APP PLayer doesn't connect. Maybe it because it's not have CPU/ABI settings. Or I just don't get how to launch this player with Unity.
It is said. Because NOX APP has touch simulating, screen shaking and other good stuff for checking game. AVD emulators doesn't have these things :'-( therefore they are useless for me.
But maybe this answer will help to someone.