该项目的目的是同时测试和演示来自 Unity DOTS 技术堆栈的多个新包。
您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

19 行
492 B

using UnityEngine;
using UnityEngine.UI;
public class NamePlate : MonoBehaviour
{
public Transform namePlateRoot;
public TMPro.TextMeshProUGUI nameText;
public RawImage icon;
public Color friendColor = Color.cyan;
public Color enemyColor = Color.red;
public float maxNameDistance = 50f;
void OnDestroy()
{
// FIXME: This should not be necessary if TextMeshProUGUI would dispose everything that it allocates.
nameText.ClearMesh();
}
}