How to Change Cameras through a Canvas Button

Currently I can Change Camera by Pressing C from keyboard but I want to do it through a Canvas Button.

Here is the Script:

public class VehicleCameraController : MonoBehaviour
	{
		public enum Mode
		{
			Fixed,
			SmoothFollow,
			MouseOrbit }
		;
		public Mode mode = Mode.SmoothFollow;

		Mode m_prevMode = Mode.SmoothFollow;

                public KeyCode changeCameraKey = KeyCode.C;

		public void LateUpdate ()
		{
			if (Input.GetKeyDown (changeCameraKey)) {
				if (mode == Mode.MouseOrbit)
					mode = Mode.Fixed;
			} else {
				mode++;
			}

			if (mode != m_prevMode) {
				ResetCamera ();
				m_prevMode = mode;
			}

			switch (mode) {
			case Mode.Fixed:
				
				DoFixedCamera ();
				break;

			case Mode.SmoothFollow:
				
				DoSmoothFollow ();
				break;

			case Mode.MouseOrbit:
				
				DoMouseOrbit ();
				break;
			}
		}
}
}

Isn’t it a solution to just create a button that calls a function to change the camera before the update. So in your button onclick there will be called a function changeCamera() that looks almost the same as your current function. So like this.

         public void ChangeCamera()
         {
             if (mode == Mode.MouseOrbit)
                     mode = Mode.Fixed;
             else {
                 mode++;
             }
 
             if (mode != m_prevMode) {
                 ResetCamera ();
                 m_prevMode = mode;
             }
 
             switch (mode) {
             case Mode.Fixed:
                 
                 DoFixedCamera ();
                 break;
 
             case Mode.SmoothFollow:
                 
                 DoSmoothFollow ();
                 break;
 
             case Mode.MouseOrbit:
                 
                 DoMouseOrbit ();
                 break;
             }
         }

And if you really want to develop it in a nice way you can hide the button when the mode is Mode.MouseOrbit .

@hoogemast Thankyou for your help
I have solved the problem by making this function

public void  camchange ()
    		{
    		
    		if (mode == Mode.MouseOrbit)
    				mode = Mode.Fixed;
    			else 
    				mode++;
    		}