/// <summary>
/// Helper function to check if the specified hit is visible by the panel.
/// </summary>
static bool IsVisible (ref RaycastHit hit)
{
UIPanel panel = NGUITools.FindInParents<UIPanel>(hit.collider.gameObject);
while (panel != null)
{
if (!panel.IsVisible(hit.point)) return false;
panel = panel.parentPanel;
}
return true;
}
/// <summary>
/// Helper function to check if the specified hit is visible by the panel.
/// </summary>
#if UNITY_FLASH
static bool IsVisible (DepthEntry de)
#else
static bool IsVisible (ref DepthEntry de)
#endif
{
UIPanel panel = NGUITools.FindInParents<UIPanel>(de.hit.collider.gameObject);
while (panel != null)
{
if (!panel.IsVisible(de.hit.point)) return false;
panel = panel.parentPanel;
}
return true;
}