为什么我的TextMeshProUI文本不会更新?

huangapple go评论58阅读模式
英文:

Why will my TextMeshProUI text not update?

问题

I recently started gamedev using Unity, and I've run into the weirdest problem. I can not for the life of me make my PlayerName TextMeshProUI element in my BattleHud script update to the value of the string "name".

为什么我的TextMeshProUI文本不会更新?

为什么我的TextMeshProUI文本不会更新?

为什么我的TextMeshProUI文本不会更新?

为什么我的TextMeshProUI文本不会更新?
为什么我的TextMeshProUI文本不会更新?
为什么我的TextMeshProUI文本不会更新?

英文:

I recently started gamedev using Unity, and I've run into the weirdest problem. I can not for the life of me make my PlayerName TextMeshProUI element in my BattleHud script update to the value of the string "name".

为什么我的TextMeshProUI文本不会更新?

为什么我的TextMeshProUI文本不会更新?

为什么我的TextMeshProUI文本不会更新?

I tried many different ways of updating, including the ways attached

为什么我的TextMeshProUI文本不会更新?
为什么我的TextMeshProUI文本不会更新?
为什么我的TextMeshProUI文本不会更新?

答案1

得分: 1

"Setdata"函数会立即启动吗?如果这个函数在第一帧调用,我认为这个问题是(名称 = "text")<- 这个函数在Setdata函数之后启动。

英文:

is "Setdata" function will start instantly? if this fuction will call first frame. I think this problem is (name = "text") <- this function is start after Setdata function.

huangapple
  • 本文由 发表于 2023年6月15日 10:58:59
  • 转载请务必保留本文链接:https://go.coder-hub.com/76478794.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定