Dropdown click penetrate

Two adjacent drop-down boxes, click to expand the content, the selected content item will penetrate。
161520485287500_00_09--00_00_29

Hi 周小军,

This is a known issue. When a Dropdown is opened, it instantiates a Canvas and GraphicRaycaster as components of the list. GraphicRaycaster must instead be ZGraphicRaycaster to work properly with zCore6.0.

Here is a script that fixes the problem by replacing GraphicRaycaster each time the Dropdown is opened. It must be attached to each Dropdown individually.

using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
using zSpace.Core.UI;

public class DropdownRaycastEnforcer : MonoBehaviour, IPointerClickHandler
{
    public void OnPointerClick(PointerEventData data)
    {
        GameObject obj =
            this.gameObject.GetComponentInChildren<GraphicRaycaster>().gameObject;

        Destroy(obj.GetComponent<GraphicRaycaster>());
        obj.AddComponent<ZGraphicRaycaster>();
    }
}

Regards,
Alex S.

Got it, thanks, and suddenly remembered the same thing in the HTC.INPUT.Utility.Plugin :joy:

According to you, it is only normal to delete the selected objects in the Hierarchy, especially the interference of the InputField object

According to what you said, there is also a necessary condition to solve the problem, which is to adjust the level of the drop-down box. Personally, I think this is a bug