Tencent / UnLua

A feature-rich, easy-learning and highly optimized Lua scripting plugin for UE.
Other
2.24k stars 614 forks source link

尝试访问UMG的部件时空对象但堆栈有值 #695

Closed kfj24 closed 7 months ago

kfj24 commented 7 months ago

c91d0a2e15c45ed7e6452600381acd4 48eaa5abd21abf554908043d33ca0c5 image 如图,在UMG中将UImage和UTextblock扩展为Variable后在lua侧断点中有值,实际访问无值

kfj24 commented 7 months ago

流程没有描述清楚

  1. load一个umg class
  2. NewObject它
  3. 尝试修改小部件 例如图中Image:SetBrushFromTexture
  4. Add to viewport 本人lua萌新。。不知为何这样会导致空指针。。
kfj24 commented 7 months ago

貌似是我的问题,先add to viewport再修改就ok了 。。