How to check if Trigger was touched or clicked?

Well, I have a gameobject that is a trigger called Object A.

I want to know how to find out if the trigger was clicked.
if I do

      void Update()
      {
          if( Input.GetMouseButton(0))
            {
                  runthefunction();
            }
      }

then it just waits for me to click anywhere.

I want the “runthefunction()” function to run when I click on ObjectA(the trigger).
Please Help!
Thank You!

Read the API first:

You’ll still need to figure out how to “touch” the object with the mouse. Usually that means sending a raycast from your mouse click on the screen into the gameworld where it might touch some “trigger” object. There are many tutorials online to help you: