Class UnityUiFilteredGraphicRaycaster
Custom GraphicRaycaster that filters raycast results based on the mouse interaction lock state.
When a lock is active, only UI elements that are children of the active owner's hierarchy will receive pointer events.
This allows the active input field to remain clickable while blocking all other UI elements.
Namespace: Serenity.Ui.Infrastructure.Services
Assembly: Serenity.UnityUi.Infrastructure.dll
Syntax
public class UnityUiFilteredGraphicRaycaster : GraphicRaycaster
Constructors
UnityUiFilteredGraphicRaycaster()
Declaration
public UnityUiFilteredGraphicRaycaster()
Methods
Initialize(ILogService)
Initializes the raycaster with a logging service.
Declaration
public void Initialize(ILogService logService)
Parameters
| Type | Name | Description |
|---|---|---|
| ILogService | logService | The logging service for debug output |
OnEnable()
Unity lifecycle method. Finds the mouse interaction lock service.
Declaration
protected override void OnEnable()
Raycast(PointerEventData, List<RaycastResult>)
Performs the raycast and filters results based on the lock state.
When locked, only results that are children of the active owner's hierarchy are kept.
Declaration
public override void Raycast(PointerEventData eventData, List<RaycastResult> resultAppendList)
Parameters
| Type | Name | Description |
|---|---|---|
| PointerEventData | eventData | The pointer event data. |
| List<RaycastResult> | resultAppendList | The list to append results to. |