The error is - Cannot convert method group GetComponent' to non-delegate type
UnityEngine.UI.Text’. Consider using parentheses to invoke the method.
I am not sure where to begin to fix this.
Here is the code…
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class Collect : MonoBehaviour {
public Text fact;
private int NumRock;
void Awake() {
}
void OnTriggerEnter(Collider other)
{
if (other.gameObject.CompareTag ("Pick Up")) {
other.gameObject.SetActive (false);
NumRock = NumRock + 1;
}
}
void Update () {
if (NumRock >= 1) {
fact = GetComponent<Text>;
fact = "The Statue of Liberty represents Libertas, the Roman goddess of freedom.";
}
}
}