- Home /
VuforiaBehavior Unable to set values properly via script
Hello there,
I've been working on something for some days and I am at a dead-end. I've been trying to set VuforiaConfiguration automatically through a script once a scene starts via Awake() function.
I am able to edit the Configuration file easily this way:-
configFile.DigitalEyewear.EyewearType = DigitalEyewearARController.EyewearType.VideoSeeThrough;
configFile.DigitalEyewear.StereoFramework = DigitalEyewearARController.StereoFramework.Cardboard;
That sets Digital Eyewear to Video See-through and chooses Cardboard. Now, I want to specify the CentralAnchorPoint, Left Main Camera, and Right Main Camera of VuforiaBehavior script through the same code and I am unable to..I've checked VuforiaBehavior and CentralAnchorPoint, PrimaryCamera, and SecondaryCamera are "internal" getters.., but I've managed to do this tho;
DigitalEyewearARController.Instance.SetCentralAnchorPoint( GameObject.Find ("CardboardMain/Head").GetComponent<Transform>());
Debug.Log ("Head name is: " + DigitalEyewearARController.Instance.CentralAnchorPoint.name);
DigitalEyewearARController.Instance.PrimaryCamera = GameObject.Find ("CardboardMain/Head/Main Camera/Main Camera Left").GetComponent<Camera>();
Debug.Log ("Leftcam name is: " + DigitalEyewearARController.Instance.PrimaryCamera.name);
DigitalEyewearARController.Instance.SecondaryCamera = GameObject.Find ("CardboardMain/Head/Main Camera/Main Camera Right").GetComponent<Camera>();
Debug.Log ("Rightcam name is: " + DigitalEyewearARController.Instance.SecondaryCamera.name);
But, that does nothing..I still see null values on VuforiaBehavior script in the inspector like the following.
I'd really appreciate any help, Thanks in advance ^^
Your answer
Follow this Question
Related Questions
Cloud recognition in Vuforia 0 Answers
vuforia augmented reality with unity3d 0 Answers
Wikitude vs Vuforia 0 Answers
Using Vuforia Ground Plane Function 0 Answers
Is there any way to hide certain elements of UI while taking screenshot 1 Answer