Virtual Button, On pressed and On release

Hello,
I created a virtual button, It working well, with two elements, Cube and Sphere, when I pressed a Virtual Button a cube element disappear and sphere element appear, in the C# script I have made I released the Virtual button the sphere element is supposed to disappear and the cube element appear but the issue is that the sphere element stay.
Some one can help me please ?

That is my C# Script :

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Vuforia;

public class VirtualButtonScript : MonoBehaviour, IVirtualButtonEventHandler
{
    public GameObject spherego, cubego;
    VirtualButtonBehaviour vrb;
   
    // Start is called before the first frame update
    void Start()
    {
        vrb = GetComponentInChildren<VirtualButtonBehaviour>();
        vrb.RegisterEventHandler(this);
        cubego.SetActive(true);
        spherego.SetActive(false);
    }

    // Update is called once per frame
    void Update()
    {
       
    }

    public void OnButtonPressed(VirtualButtonBehaviour vb)
    {
        cubego.SetActive (false);
        spherego.SetActive (true);
    }

    public void OnButtonReleased(VirtualButtonBehaviour vb)
    {
        cubego.SetActive (true);
        spherego.SetActive (false);
    }

}

Bellow Is image, in red : Virtual Button, in green : Cube in Yellow : Sphere

Thanks

I’m certainly sure that you made the right script except for the fact that you initialized VirtualButtonBehaviour “vrb” and when you call it you are using VirtualButtonBehaviour “vb”. Try changing it. i guess that should do the trick