Class MouseCaptureEventBase<T>
Event sent when the handler capturing the mouse changes.
Inherited Members
Namespace: UnityEngine.UIElements
Syntax
public abstract class MouseCaptureEventBase<T> : PointerCaptureEventBase<T>, IPointerCaptureEvent, IMouseCaptureEvent where T : MouseCaptureEventBase<T>, new()
Type Parameters
Name | Description |
---|---|
T |
Properties
relatedTarget
In the case of a MouseCaptureEvent, this property is the IEventHandler that loses the capture. In the case of a MouseCaptureOutEvent, this property is the IEventHandler that gains the capture.
Declaration
public IEventHandler relatedTarget { get; }
Property Value
Type | Description |
---|---|
IEventHandler |
Methods
GetPooled(IEventHandler, IEventHandler)
Gets an event from the event pool and initializes it with the given values. Use this function instead of creating new events. Events obtained using this method need to be released back to the pool. You can use Dispose()
to release them.
Declaration
public static T GetPooled(IEventHandler target, IEventHandler relatedTarget)
Parameters
Type | Name | Description |
---|---|---|
IEventHandler | target | The handler taking or releasing the mouse capture. |
IEventHandler | relatedTarget | The related target. |
Returns
Type | Description |
---|---|
T | An initialized event. |
Init()
Resets the event members to their initial values.
Declaration
protected override void Init()
Overrides
UnityEngine.UIElements.PointerCaptureEventBase<T>.Init()