This site has been permanently archived. The content on this site was last updated in 2019.
Stay organized with collections
Save and categorize content based on your preferences.
GvrPointerEventDataExtension
This class extends the Unity PointerEventData
struct with GoogleVR data accessors.
Summary
Public static functions
|
GvrGetButtonsDown(this PointerEventData pointerEventData)
|
GvrControllerButton
Returns the GvrControllerButton mask of buttons that went down to trigger the event.
|
GvrGetControllerInputDevice(this PointerEventData pointerEventData)
|
|
Public static functions
GvrControllerButton GvrGetButtonsDown(
this PointerEventData pointerEventData
)
Returns the GvrControllerButton
mask of buttons that went down to trigger the event.
Details |
Parameters |
pointerEventData
|
Pointer event data.
|
|
Returns
|
The GvrControllerButton mask of buttons that went down to trigger the event.
|
GvrControllerInputDevice GvrGetControllerInputDevice(
this PointerEventData pointerEventData
)
Returns the GvrControllerInputDevice
that triggered the event.
Details |
Parameters |
pointerEventData
|
Pointer event data.
|
|
Returns
|
The get controller input device.
|
All rights reserved. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-09 UTC.
[null,null,["Last updated 2024-10-09 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eGvrPointerEventDataExtension\u003c/code\u003e class enhances Unity's \u003ccode\u003ePointerEventData\u003c/code\u003e to include GoogleVR data.\u003c/p\u003e\n"],["\u003cp\u003eIt provides access to the GoogleVR controller buttons that triggered an event through \u003ccode\u003eGvrGetButtonsDown\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt allows retrieval of the specific \u003ccode\u003eGvrControllerInputDevice\u003c/code\u003e associated with an event using \u003ccode\u003eGvrGetControllerInputDevice\u003c/code\u003e.\u003c/p\u003e\n"]]],["The `GvrPointerEventDataExtension` class enhances Unity's `PointerEventData` with GoogleVR access. It provides two key functions: `GvrGetButtonsDown` and `GvrGetControllerInputDevice`. `GvrGetButtonsDown` identifies which `GvrControllerButton` caused the event. `GvrGetControllerInputDevice` pinpoints the specific `GvrControllerInputDevice` responsible for triggering the event. Both functions utilize `pointerEventData` to retrieve the needed information. The class effectively extends pointer event data with crucial controller and button details for GoogleVR.\n"],null,["# GvrPointerEventDataExtension Class Reference\n\nGvrPointerEventDataExtension\n============================\n\nThis class extends the Unity `PointerEventData` struct with [GoogleVR](/vr/reference/unity/namespace/GoogleVR#namespaceGoogleVR) data accessors.\n\nSummary\n-------\n\n| ### Public static functions ||\n|------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [GvrGetButtonsDown](#classGvrPointerEventDataExtension_1aa1058b922f5b80eb5b68c5305a2efc1b)`(this PointerEventData pointerEventData)` | `GvrControllerButton` Returns the `GvrControllerButton` mask of buttons that went down to trigger the event. |\n| [GvrGetControllerInputDevice](#classGvrPointerEventDataExtension_1a67bc27f9a436d9310ee2dc1931680e56)`(this PointerEventData pointerEventData)` | [GvrControllerInputDevice](/vr/reference/unity/class/GvrControllerInputDevice#classGvrControllerInputDevice) Returns the [GvrControllerInputDevice](/vr/reference/unity/class/GvrControllerInputDevice#classGvrControllerInputDevice) that triggered the event. |\n\nPublic static functions\n-----------------------\n\n### GvrGetButtonsDown\n\n```c#\nGvrControllerButton GvrGetButtonsDown(\n this PointerEventData pointerEventData\n)\n``` \nReturns the `GvrControllerButton` mask of buttons that went down to trigger the event.\n\n\u003cbr /\u003e\n\n| Details ||\n|-------------|-------------------------------------------------------------------------------------------|\n| Parameters | |--------------------|---------------------| | `pointerEventData` | Pointer event data. | |\n| **Returns** | The `GvrControllerButton` mask of buttons that went down to trigger the event. |\n\n### GvrGetControllerInputDevice\n\n```c#\nGvrControllerInputDevice GvrGetControllerInputDevice(\n this PointerEventData pointerEventData\n)\n``` \nReturns the [GvrControllerInputDevice](/vr/reference/unity/class/GvrControllerInputDevice#classGvrControllerInputDevice) that triggered the event.\n\n\u003cbr /\u003e\n\n| Details ||\n|-------------|-------------------------------------------------------------------------------------------|\n| Parameters | |--------------------|---------------------| | `pointerEventData` | Pointer event data. | |\n| **Returns** | The get controller input device. |"]]