# ReleasePointer

> Tests whether an element captured a pointer and, if so, tells the element to release the pointer.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.UIElements](/engine/6000.6/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

## ReleasePointer(IEventHandler, int)

Tests whether an element captured a pointer and, if so, tells the element to release the pointer.

```csharp
public static void ReleasePointer(this IEventHandler handler, int pointerId)
```

### Parameters

**** (\[IEventHandler]\(/engine/6000.6/script-reference/unityengine/uielements/ieventhandler)): The element which potentially captured the pointer.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The captured pointer.

### Remarks

If a pointer release is requested during the propagation of an existing event, the release takes effect only after the ongoing event has been fully dispatched and propagated.

## ReleasePointer(IPanel, int)

Releases the pointer.

```csharp
public static void ReleasePointer(this IPanel panel, int pointerId)
```

### Parameters

**** (\[IPanel]\(/engine/6000.6/script-reference/unityengine/uielements/ipanel)): The panel that holds the element that captured the pointer.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The captured pointer.

### Remarks

If a pointer release is requested during the propagation of an existing event, the release takes effect only after the ongoing event has been fully dispatched and propagated.
