GUIElement does not contain a definition for 'text'. Help

Hi! I’m new here. I have a legacy UI problem as I found out Unity wouldn’t start my build until all compiler errors (the yellow ones) have been fixed.

Here’s the code.

namespace UnityStandardAssets.Utility

{
public class SimpleActivatorMenu : MonoBehaviour

{
    // An incredibly simple menu which, when given references
    // to gameobjects in the scene

	public GUIElement camSwitchButton;
    public GameObject[] objects;

    private int m_CurrentActiveObject;

    private void OnEnable()
    {
        // active object starts from first in array
        m_CurrentActiveObject = 0;
        camSwitchButton.**text** = objects[m_CurrentActiveObject].name;
    }

    public void NextCamera()
    {
        int nextactiveobject = m_CurrentActiveObject + 1 >= objects.Length ? 0 : m_CurrentActiveObject + 1;

        for (int i = 0; i < objects.Length; i++)
        {
            objects*.SetActive(i == nextactiveobject);*

}
m_CurrentActiveObject = nextactiveobject;
camSwitchButton.text = objects[m_CurrentActiveObject].name;
}
}
}
The text in camSwitchButton.text is what gives me an error. I do not know what to replace ‘text’ with as I was unable to find when it was made obsolete. Any help would be appreciated.

The [GUIElement][1] class does not have a text property. You could use the [GUIText][2] class instead.

public GUIText camSwitchButton;

However, I highly suggest moving to the new [UI system][3], and its