Files
Convention-Unity-Demo/Assets/Scripts/Framework/GameContent/RotationIndicator.cs

22 lines
472 B
C#
Raw Normal View History

2025-09-25 19:04:05 +08:00
using System.Collections;
using System.Collections.Generic;
using Convention;
using TMPro;
using UnityEngine;
namespace Demo.Game
{
public class RotationIndicator : MonoBehaviour
{
public GameObject faceTo;
public TMP_Text text;
private void Update()
{
text.text = transform.eulerAngles.ToString();
if (faceTo != null)
text.transform.rotation = faceTo.transform.rotation;
}
}
}