尝试修改丢text的情况
This commit is contained in:
@@ -40,6 +40,14 @@ namespace Continentis.MainGame.UI
|
||||
}
|
||||
|
||||
TMP_Text text = textList[textIndex];
|
||||
|
||||
if (text == null)
|
||||
{
|
||||
Debug.LogWarning($"Text component at index {textIndex} is null.");
|
||||
// 如果这里触发了,说明上层逻辑在尝试操作一个已经死亡的 UI 对象
|
||||
return;
|
||||
}
|
||||
|
||||
if (getText != null)
|
||||
{
|
||||
text.gameObject.SetActive(true);
|
||||
|
||||
Reference in New Issue
Block a user