I realize that this question isn’t entirely related to Vuforia. I’m just trying to gather as much helpful info as I can as a new Unity developer.
My Vuforia application recognizes my Tracking Image and successfully displays the eight different Trackers that I have created in Unity when the image is in the camera. (…do I have the nomenclature right there?)
What I would like to do now is to create a button on the screen that the user can press. Each press of the button will enable one more of the “Trackables”.
So far I’ve managed to find code that creates buttons that I can use to load different scenes in Unity. My idea is to adapt this code to increase the value of a variable when the button is pressed. I’ll then use that variable in the DefaultTrackableEventHandler.cs
My first thought is to use if statements; If the button press variable is greater than the threshold for that Trackable, then Enable. After enough button presses, all of my Trackables will be visible.
I’m still working through examples to figure out what I need to do exactly. But any feedback on the approach, or where I can find more related info/examples would be a big help.
The scripts more or less work now. But I occassionally get a "flash" of the disabled objects when the counter is below the threshold to have them appear. I'm sure this is a Unity thing and not a Vuforia thing, but someone may have seen it before.
Next and Reset Buttons Script
Game Objects Script
I've basically got 9 copies of the game object script. Each copy "triggers" on a different count.
This works fairly well. But there are sometimes 'flashes' of the disabled objects.