Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


StopImmediatePropagation()

Stops the propagation of the event to other targets, and prevents other subscribers to the event on this target to receive the event.
Read time 1 minuteLast updated 10 days ago

Definition

public void StopImmediatePropagation()

Remarks

The event is not sent to other elements along the propagation path. If the propagation is in the PropagationPhase.TrickleDown phase, this prevents event handlers from executing on children of the _currentTarget, including on the event's _target itself, and prevents all event handlers using the TrickleDown.NoTrickleDown option from executing (see CallbackEventHandler.RegisterCallback). If the propagation is in the PropagationPhase.BubbleUp phase, this prevents event handlers from executing on parents of the _currentTarget.
This method has the same effect as EventBase.StopPropagation() except on execution of other event handlers on the _currentTarget.
Calling this method does not prevent some internal actions to be processed, such as an element getting focused as a result of a PointerDownEvent.
Refer to the Dispatch events manual page for more information and examples.
Additional Resources: EventBase.StopPropagation()