Class WheelEvent
Mouse wheel event.
Inherited Members
Namespace: UnityEngine.UIElements
Syntax
public class WheelEvent : MouseEventBase<WheelEvent>, IMouseEvent, IMouseEventInternal
Constructors
WheelEvent()
Constructor. Use GetPooled() to get an event from a pool of reusable events.
Declaration
public WheelEvent()
Properties
delta
The amount of scrolling applied with the mouse wheel.
Declaration
public Vector3 delta { get; }
Property Value
Type | Description |
---|---|
Vector3 |
Methods
GetPooled(Event)
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 WheelEvent GetPooled(Event systemEvent)
Parameters
Type | Name | Description |
---|---|---|
Event | systemEvent | A wheel IMGUI event. |
Returns
Type | Description |
---|---|
WheelEvent | An initialized event. |
Init()
Resets the event members to their initial values.
Declaration
protected override void Init()
Overrides
UnityEngine.UIElements.MouseEventBase<UnityEngine.UIElements.WheelEvent>.Init()