自定义UI阻挡区域

mac2024-05-11  31

public bool IsRaycastLocationValid(Vector2 sp, Camera eventCamera) { RectTransformUtility.ScreenPointToLocalPointInRectangle(transform as RectTransform, sp, UIManager.instance.uiCamera, out sp); if (sp.x > m_rect.x - m_rect.z * .5f && sp.x < m_rect.x + m_rect.z * .5f && sp.y > m_rect.y - m_rect.w * .5f && sp.y < m_rect.y + m_rect.w * .5f) { return false; } return true; }

 

最新回复(0)