Vuforia Virtual Buttons not working.

I am creating basic virtual buttons using Vuforia but my button presses are not being detected.

This is the code. I don’t see any reason this should not work but it doesn’t.
The area has a high concentration of feature points,
The Virtual Button brideVB is a child of the Image target and this script is added to the Image target.

Any help appreciated
Thanks in Advance

Do you get any error messages ?

It says the Virtual buttons could not be initialized on the target.

Can you post the complete Error Message ? My guess would be it is saying invalid area ?

8143376--1057340--upload_2022-5-20_20-34-51.png

Please check that your virtual buttons dont touch each other. Also the virtual button is not allowed to go over the Image Target, even if it is just a bit. Is your Image Target working correctly ? The button released debug log seems wrong, because this log will show up when the button is pressed, not when it is released. Also the line brideVB.GetComponent<VirtualButtonBehaviour>(); is useless, as you already have the VirtualButtonBehaviour. Please click on the first error messag and show me the detailed text. Are you pressing the button on your Image Target (in real world) ?

The virtual buttons don’t touch and are not anywhere near the bounds, they are all centred. The image Target does work and it shows in the console when it’s recognised and if I place a 3D model that does show up when the image is detected.
As for the log that is just a copy-paste to replace my code to check if the function is even getting called, which it’s not.

Virtual button ‘ImageTarget’ can only be registered for a predefined target.
UnityEngine.Debug:LogError (object)
Vuforia.Internal.Utility.UnityLogger:LogError (string)
Vuforia.Internal.Utility.Log:Error (string)
Vuforia.ImageTargetBehaviour:CreateNewVirtualButtonFromBehaviour (Vuforia.VirtualButtonBehaviour)
Vuforia.ImageTargetBehaviour:AssociateVirtualButtons ()
Vuforia.ImageTargetBehaviour:RegisterObserverInternal (Vuforia.Internal.Observers.IObserver)
Vuforia.ObserverBehaviour:RegisterObserver (Vuforia.Internal.Observers.IObserver)
Vuforia.ImageTargetBehaviour:CreateObserverFromBuffer (Vuforia.Internal.Core.IObserverFactory)
Vuforia.ImageTargetBehaviour:CreateFromSerializedTarget ()
Vuforia.ObserverBehaviour:OnVuforiaStarted ()
System.Delegate:smile:ynamicInvoke (object[ ])
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeDelegate (System.Delegate,object[ ])
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeWithExceptionHandling (System.Action)
Vuforia.Internal.Core.Engine:OnStart ()
Vuforia.Internal.Core.Engine:Start (System.Action)
Vuforia.Internal.Core.Engine:Start ()
Vuforia.VuforiaBehaviour:VuforiaInitialized (Vuforia.VuforiaInitError)
System.Delegate:smile:ynamicInvoke (object[ ])
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeDelegate (System.Delegate,object[ ])
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeWithExceptionHandling<Vuforia.VuforiaInitError> (System.Action`1<Vuforia.VuforiaInitError>,Vuforia.VuforiaInitError)
Vuforia.Internal.Core.Engine:InitOnCameraReady ()
Vuforia.WebCam:HandleFirstWebCamFrame ()
Vuforia.WebCam:b__33_0 (bool)
Vuforia.Internal.Utility.VuforiaCoroutineUtility/d__1:MoveNext ()
UnityEngine.SetupCoroutine:InvokeMoveNext (System.Collections.IEnumerator,intptr)

Failed to create virtual button at startup
UnityEngine.Debug:LogError (object)
Vuforia.Internal.Utility.UnityLogger:LogError (string)
Vuforia.Internal.Utility.Log:Error (string)
Vuforia.ImageTargetBehaviour:AssociateVirtualButtons ()
Vuforia.ImageTargetBehaviour:RegisterObserverInternal (Vuforia.Internal.Observers.IObserver)
Vuforia.ObserverBehaviour:RegisterObserver (Vuforia.Internal.Observers.IObserver)
Vuforia.ImageTargetBehaviour:CreateObserverFromBuffer (Vuforia.Internal.Core.IObserverFactory)
Vuforia.ImageTargetBehaviour:CreateFromSerializedTarget ()
Vuforia.ObserverBehaviour:OnVuforiaStarted ()
System.Delegate:smile:ynamicInvoke (object[ ])
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeDelegate (System.Delegate,object[ ])
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeWithExceptionHandling (System.Action)
Vuforia.Internal.Core.Engine:OnStart ()
Vuforia.Internal.Core.Engine:Start (System.Action)
Vuforia.Internal.Core.Engine:Start ()
Vuforia.VuforiaBehaviour:VuforiaInitialized (Vuforia.VuforiaInitError)
System.Delegate:smile:ynamicInvoke (object[ ])
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeDelegate (System.Delegate,object[ ])
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeWithExceptionHandling<Vuforia.VuforiaInitError> (System.Action`1<Vuforia.VuforiaInitError>,Vuforia.VuforiaInitError)
Vuforia.Internal.Core.Engine:InitOnCameraReady ()
Vuforia.WebCam:HandleFirstWebCamFrame ()
Vuforia.WebCam:b__33_0 (bool)
Vuforia.Internal.Utility.VuforiaCoroutineUtility/d__1:MoveNext ()
UnityEngine.SetupCoroutine:InvokeMoveNext (System.Collections.IEnumerator,intptr)

the detailed errors.

Sorry it won’t let me add spaces so it doesn’t consider then emojis… it says System.Delegate: dynamicInvoke

I did find the issue but forgot to add them here.
In my case, they were not working as I had added the image directly from my system. Virtual buttons require you to upload the image to their website and download it as a database.