去掉UIRaycastNoDraw组件,这个组件会造成:
MissingComponentException: There is no 'CanvasRenderer' attached to the "btn" game object, but a script is trying to access it.
This commit is contained in:
parent
4db90bfa24
commit
1bf43e95d0
@ -233,7 +233,7 @@ function UIFuncUnlockMgr:NormalLock(wnd, data, target, result, key, guideState,
|
||||
local rectTrans = go:GetOrAddComponent(Enum.TypeInfo.RectTransform)
|
||||
rectTrans.sizeDelta = targetSize
|
||||
|
||||
go:GetOrAddComponent(Enum.TypeInfo.UIRaycastNoDraw)
|
||||
--go:GetOrAddComponent(Enum.TypeInfo.UIRaycastNoDraw)
|
||||
go:GetOrAddComponent(Enum.TypeInfo.Button)
|
||||
end
|
||||
if lockBtn == nil and go ~= nil then
|
||||
@ -251,7 +251,7 @@ function UIFuncUnlockMgr:NormalLock(wnd, data, target, result, key, guideState,
|
||||
local rectTrans = go:GetOrAddComponent(Enum.TypeInfo.RectTransform)
|
||||
rectTrans.sizeDelta = targetSize
|
||||
|
||||
go:GetOrAddComponent(Enum.TypeInfo.UIRaycastNoDraw)
|
||||
--go:GetOrAddComponent(Enum.TypeInfo.UIRaycastNoDraw)
|
||||
go:GetOrAddComponent(Enum.TypeInfo.Button)
|
||||
end
|
||||
if lockBubble == nil and go ~= nil then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user