- Home /
VuforiaBehavior Unable to set values properly via script
Hello there, So, I've com to a better understanding to my problem and updated the question:-
I've been working on something for 3 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 ^^