using UnityEngine; public class InformantEnemyHealthLookAt : MonoBehaviour { private RectTransform rectT; private Transform trans; public bool notCanvasObject = false; private void Awake() { if (!notCanvasObject) rectT = GetComponent<RectTransform>(); else trans = GetComponent<Transform>(); } private void Update() { if (!notCanvasObject) rectT.eulerAngles = new Vector3(40, 0, 0); else trans.eulerAngles = new Vector3(0, -90, 45); } }