camera not opening while creating an window.exe application using Unity3D and Vuforia
Hi
We have used Vuforia and Unity3D and utilized the laptop camera for a small application.
While playing the application in Unity3D, the camera port is opening and it is working accordingly. But while creating an WINDOWS.EXE, the camera port is not opening for the same application.
This is the code I have used:
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI;
public class anglee : MonoBehaviour {
public Text incl, anti;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
incl.text="Inclination Angle : "+ Mathf.Round(Camera.main.transform.rotation.z*360f);
anti.text="Antiversion Angle : "+ Mathf.Round(Camera.main.transform.rotation.x*360f);
}
}
Sorry - I have no answer, just exactly the same issue:
I have used Vuforia (v7) + Unity (2017.3.0f3) to create an image target that triggers an AR model. This works on my dev-PC (Win10, 64-bit) with an attached USB WebCam. I can build this for Android and run it on mobile with no problems. I then build for Windows (x86, 64-bit) and it runs up, asks me what resolution, graphics quality and "Windowed" or not - but then comes up with a black Window - no camera interaction at all.
It even does this on the same dev-PC that I developed within Unity - but as a standalone app - just a black box. I have also tried moving the executable/DLL/directory to a Surface Pro (Win10, 64-bit, embedded camera) with the same black-box result.
I feel there must be some simple step we are missing here?
Answer by SP-Unige · May 03, 2018 at 09:52 AM
Sorry for the necropost @contactselvam , but I feel like this is still an issue for the 131 people following, and is a critical point of almost all AR/VR software. As far as I can tell, Vuforia does not support builds to any desktop device (regardless of OS), only devices intended for VR/AR capabilities: https://www.vuforia.com/devices.html
While it may be possible to directly get the camera feed through code, good tutorial here: https://www.youtube.com/watch?v=c6NXkZWXHnc, I don't think it would be possible to then force that feed through the Vuforia image tracking scripts. I haven't been able to get working that way anyways.
There is a solution that has been made, but it's not free. Thread: https://stackoverflow.com/questions/37912521/how-to-build-vuforia-unity-project-as-a-windows-pc-standalone-app Apparently what maximrouf did was somehow trick Vuforia that the build was actually in play mode.
This issue has been on the Vuforia wish-list thread for three years, so I doubt that there's ever going to be desktop build support natively.
Your answer
Follow this Question
Related Questions
"target platform" and "architecture" sectors missing from build setting 1 Answer
Why can't I build? 1 Answer
Why the build resolution is different than in the editor 0 Answers
UWP AR Vuforia App Camera Turning Off when Minimised and not Turning Back On 1 Answer
Rigidbody with box collider falling through another rigidbody with box collider 0 Answers