[Unity Engine] 關於我在Unity中踩的一些坑 - UI篇
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
持續更新中…因為坑只會越踩越多
按鈕點下去沒反應…
UI Button不能按可能來自以下這幾個原因
請先利用EventSystem
查看點到甚麼物件
- Button沒有Raycast Target(預設為Image元件),或是Raycast Target沒有打勾(為false)
- Iteractable們有打勾(為false)
- 如果Button的Parent Canvas是巢狀的,則該Canvas需要加上GraphicsRaycaster元件
- 場景中沒有EventSystem
Ref: Can't click item
PointerEvent
Inherit from BaseEventData