- Home /
how to appear UI button when ImageTarget detected?
Hi i study AR about vuforia SDK in Unity i try to when detect image target appear some buttons and click that buttons appear another object and information so i create button under ui, and built it ![alt text][1]
i thought button will be appear when image target detected but button were appear before detected image target
and detected image target button take a seat side of object ![alt text][2]
how i config button appear when detected image target? and a button called some object and that object enable other button disable until called object close(or disable activity) ? thanks
Note: i disable activity button write Button1,Button2 and write script in 3d object under image target
public GameObject Button1;
public GameObject Button2;
// Use this for initialization
void Start () {
Button1.SetActive(true);
Button2.SetActive(true);
}
// Update is called once per frame
void Update () {
}
}
`` [1]: /storage/temp/98827-q.png [2]: /storage/temp/98829-q2.png
post by @seonho
Answer by inovotm · Jul 31, 2017 at 08:11 AM
@CSH92 I didn't get your question Exactly, As per i understood
-Basically in Vuforia Image Target contains DefaultTrackableEventHandler script -Find OnTackingFound Function in it -You can either Instantiate or Enable/Disable Button in this function -On button click event Instantiate or Enable/Disable your Object and hide button Hope this helps
@inovotm Thank you for your reply. First, I apologize for the poor English language. Your intention is that I want the button to be called when the AR image is loaded Your answer is appreciated, but I find it difficult to approach the solution in such a way When using that function, where should the buttons be displayed and the images to be displayed? Do buttons need to be below the image target? Or does it matter where the buttons are? thank
1) OnTrackingfound you want to display one button or image or both??
2) Button should be above the image target otherwise you won't click it or see it.
I do not know what OnTracking is. What does OnTracking mean when I found this button? The button appears as soon as I launch the app I want this button to be visible after loading the object through the image target, not when launching the app Also, I did not include the canvas with buttons anywhere
Thank you~! i use Ontrcking function so i can appear UI when imageTarget Detected!!
I know what you mean, but can i make the DefaultTrackableEventHandler for each image target? cause when i change the script, then the whole image target will apply from this script too. For Example i want to make text "Elephant" appear when image elephant target found, but also i need the "Horse" text visible when the image target horse found.
Answer by CSH92 · Jul 31, 2017 at 08:14 AM
I'm sorry I can not speak English well. In summary, i will want to see the buttons when I recognize the image and load the object into the AR
Answer by safarez · Oct 25, 2017 at 09:07 AM
Sorry, I cant found the OnTrackingFound function. Can you snap the picture please?
Your answer
Follow this Question
Related Questions
how can I use the vuforia text recogniton with out using the sample package? 0 Answers
Add Unity3D + Vuforia iOS Project in existing iOS Project 0 Answers
ArgumentException: Illegal characters in path while compiling in Android with Vuforia SDK 0 Answers
How can I have vuforia text recognition read in a phrase instead of just a single word. 1 Answer