First, I need to deactivate a game object and then after 10 seconds, activate it, so I thought coroutines are suitable:
IEnumerator BarDeactivate(float sec)
I have this issue with ARCore, Vuforia, etc. because GameObjects are not alive until they can be tracked. One way is wait for the target to be recognized and then look for the GameObjects, but if they are manually inactive the only other (uncomplicated?) way would be to manually list them and link them as a public array with the script. If your script is linked then even an inactive GameObject will be accessible.