Enable/Disable JS Script Problem (AR) using CS

Hi, i make an Augmented Reality Project use CS Script (DefaultTrackableEventHandler.cs) for enable and disable my JS Script Button (GUImenuTEST.js)

This my sample script :

using UnityEngine;

public class DefaultTrackableEventHandler : MonoBehaviour,
                                            ITrackableEventHandler
{
    private TrackableBehaviour mTrackableBehaviour;
	
    private GUImenuTEST jsScript;
    
    void Start()
    {
		jsScript = GetComponent<GUImenuTEST>();
		
		mTrackableBehaviour = GetComponent<TrackableBehaviour>();
        if (mTrackableBehaviour)
        {
            mTrackableBehaviour.RegisterTrackableEventHandler(this);
        }
		
    }

    public void OnTrackableStateChanged(
                                    TrackableBehaviour.Status previousStatus,
                                    TrackableBehaviour.Status newStatus)
    {
        if (newStatus == TrackableBehaviour.Status.DETECTED ||
            newStatus == TrackableBehaviour.Status.TRACKED ||
            newStatus == TrackableBehaviour.Status.EXTENDED_TRACKED)
        {
            OnTrackingFound();
			
			//THIS ERROR MESSAGE = error CS0120: An object reference is required to access non-static member `UnityEngine.Behaviour.enabled'
			GUImenuTEST.enabled = !GUImenuTEST.enabled; 
        }
        else
        {
            OnTrackingLost();
        }
    }

    private void OnTrackingFound()
    {
        Renderer[] rendererComponents = GetComponentsInChildren<Renderer>(true);
        foreach (Renderer component in rendererComponents)
        {
            component.enabled = true;
        }
        Debug.Log("Trackable " + mTrackableBehaviour.TrackableName + " found");
    }

    private void OnTrackingLost()
    {
        Renderer[] rendererComponents = GetComponentsInChildren<Renderer>(true);
        foreach (Renderer component in rendererComponents)
        {
            component.enabled = false;
        }
        Debug.Log("Trackable " + mTrackableBehaviour.TrackableName + " lost");
    }

}

But, i have a error message like this " An object reference is required to access non-static member `UnityEngine.Behaviour.enabled’ " on this code " GUImenuTEST.enabled = !GUImenuTEST.enabled; "

So, how to fix it ?
How to if i want to disable my Button Script (GUImenuTEST.js) if start running, and then will enable when TrackingFound, and disable again when TrackingLost ?
Please, help :slight_smile:

replace this code

jsScript = (GUImenuTEST)findObjectOfType(typeof(GUImenuTEST));

and place the GUImenuTEST script in plugins folder.then only u can call javascript in C#