Ok so everything I look up says to use World space GUI. this is not the effect I want, I have I’m looking to do a full screen radar like in space sim games that show enemy GUI tracking the objects
I’ve built the GUI prefab just need to track to the object on screen after I instantiate the GUI into the main canvas.
Every tutorial I’ve looked at is terrible and not what I’m looking for, world-space GUIs shrink and scale in size, with camera position i do not want this, Also Assets for radars I have tried do not work with photon instantiated objects.
AI Health code:
void Start(){
GameCanvus = GameObject.FindGameObjectWithTag ("GameCanvus");
GameObject Clone = Instantiate (ObjectHealthGUI, transform.position, transform.rotation);
Clone.transform.parent = GameCanvus.transform;
HealthTracker TrackerCS = Clone.GetComponent<HealthTracker> ();
TrackerCS.Health = Health;
TrackerCS.HealthMax = HealthMax;
}
AI GUI TRACKER:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class HealthTracker : MonoBehaviour {
public float Health = 100;
public float HealthMax = 100;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
}