Editar

Partilhar via


EventSystemExtensions.ExecuteHierarchyUpward<T> Method

Definition

Bubbles up an event to the parents of the root game object if the event data is not already used.

public:
generic <typename T>
 where T : UnityEngine::EventSystems::IEventSystemHandler static UnityEngine::GameObject ^ ExecuteHierarchyUpward(UnityEngine::GameObject ^ root, UnityEngine::EventSystems::BaseEventData ^ eventData, UnityEngine::EventSystems::ExecuteEvents::EventFunction<T> ^ callbackFunction);
public static UnityEngine.GameObject ExecuteHierarchyUpward<T> (UnityEngine.GameObject root, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents.EventFunction<T> callbackFunction) where T : UnityEngine.EventSystems.IEventSystemHandler;
static member ExecuteHierarchyUpward : UnityEngine.GameObject * UnityEngine.EventSystems.BaseEventData * UnityEngine.EventSystems.ExecuteEvents.EventFunction<'T (requires 'T :> UnityEngine.EventSystems.IEventSystemHandler)> -> UnityEngine.GameObject (requires 'T :> UnityEngine.EventSystems.IEventSystemHandler)
Public Function ExecuteHierarchyUpward(Of T As IEventSystemHandler) (root As GameObject, eventData As BaseEventData, callbackFunction As ExecuteEvents.EventFunction(Of T)) As GameObject

Type Parameters

T

The EventFunction type.

Parameters

root
UnityEngine.GameObject

Events start executing on the parent of this game object.

eventData
UnityEngine.EventSystems.BaseEventData

Data associated with the Executing event.

callbackFunction
ExecuteEvents.EventFunction<T>

Function to execute on the gameObject components.

Returns

UnityEngine.GameObject

GameObject that handled the event

Applies to