[英]Detect UNITY UI image only moves inside another image or rect transform
我在統一場景中有兩個形象。 此圖像中的一個是作為背景Recttransform ,另一個圖像是一個按鈕。
Recttransform
我將“拖動事件”用於此按鈕來檢測運行時的運動。
但是我只想在背景圖像內移動此按鈕。
而且我不知道如何進行此限制。 這個問題有什么解決方案嗎?
有關更多說明,請參見此圖像:
在我頭頂上方,有兩種方法可以做到這一點:
[英]Position of rect Transform in unity UI
[英]Unity - Check if mouse click was inside of a rect transform
[英]How to detect mouse over for UI image in Unity 5?
[英]Unity detect image collision only OnEndDrag
[英]Unity, how to change only “top” of GameObject rect transform
[英]Unity - Can't center mini-map viewport rect inside center of the image
[英]Moving Player UI Image in Unity
[英]UI Image crashes Unity on play
[英]Unity clamped UI Image is shaking
[英]how to check UI rect inside Canvas rect
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.