I am working on A HUD for my FPS game and i am having some trouble with the Health Script. to be more specific the problem is with the new 4.6 UI i have tried all day to fix this. Some Please Help.
EDIT: I somehow think that this code may be important (sarcasm)
using UnityEngine.UI;
public class BASEH : MonoBehaviour {
public string input = "Please Enter Text";
public GameObject otherGameObject;
private health anotherScript;
Text text;
void awake(){
// Health = this.GetComponent(Health);
anotherScript = otherGameObject.GetComponent<health>();
text = GetComponent<Text>();
Debug.Log("Another"+" "+anotherScript.GetHealth());
}
// Use this for initialization
//void Start () {
// Debug.Log("Another" + " " + anotherScript.GetHealth());
//}
// Update is called once per frame
void Update () {
//text = GetComponent<Text>();
text.text = input;//anotherScript.GetStringHealth();//input;
}
}