Files
MuHua-Core/Assets/ModuleMuHua/LabelFollow/Script/StandardLabel.cs
T
2025-03-14 11:50:18 +08:00

25 lines
550 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using MuHua;
namespace MuHua.Sample
{
public class StandardLabel : MonoBehaviour
{
public GameObject labelPrefab;
public Vector3 offset = new Vector3(0, 1, 0);
private GameObject labelObject;
void Start()
{
labelObject = LabelController.CreateLabel(transform, labelPrefab, offset);
}
void OnDestroy()
{
if (labelObject != null) { Destroy(labelObject); }
}
}
}