
在canvas下挂脚本
[Tooltip("Determines if a UI Click action should happen when a UI Pointer game object collides with this canvas.")]
public bool clickOnPointerCollision = false;
[Tooltip("Determines if a UI Pointer will be auto activated if a UI Pointer game object comes within the given distance of this canvas. If a value of `0` is given then no auto activation will occur.")]
public float autoActivateWithinDistance = 0f;
本文介绍了Unity中UI Canvas组件的两个关键属性:clickOnPointerCollision和autoActivateWithinDistance。通过这些属性可以控制UI元素与玩家输入之间的交互行为,如点击响应和自动激活条件。
1483

被折叠的 条评论
为什么被折叠?



