hey. my OnGUI code is renered on all cameras still it not even attached to the Prefab or GameObject
Code:
using UnityEngine;
using System.Collections;
public class PlayerHealth : MonoBehaviour {
public int maxHealth = 100;
public int curHealth = 100;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
private void OnGUI () {
GUI.Box (new Rect( 450, 570, Screen.width / 3, 20), curHealth + "/" + maxHealth);
}
}
i will have it to render only the object is attached to.
exsample.
2 objects have is attached to. its a dupplicated
i will have it to.
it not showing the other players health.
Thanks. i totally forgot is option :)
– ScoutGamesStudio