20 lines
450 B
C#
20 lines
450 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
namespace UnityTest.ZXL
|
|
{
|
|
public abstract class Label : MonoBehaviour
|
|
{
|
|
protected void Update()
|
|
{
|
|
var currentCamera = CameraManager.Instance().GetCurrentCamera();
|
|
if (currentCamera == null)
|
|
{
|
|
return;
|
|
}
|
|
|
|
var currentTransform = currentCamera.transform;
|
|
transform.LookAt(currentTransform);
|
|
}
|
|
}
|
|
} |