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.
Implementation of GvrPointerInputModule
.
Summary
Properties
|
CurrentEventData
|
Gets PointerEventData from the most recent frame.
|
EventExecutor
|
Gets or sets an interface for executing events.
|
ModuleController
|
Gets or sets an interface for controlling the actual input module.
|
Pointer
|
Gets or sets the GvrBasePointer which will be responding to pointer events.
|
ScrollInput
|
|
VrModeOnly
|
bool
Gets or sets a value indicating whether the pointer input is active in VR Mode only or whether it is always active.
|
Properties
Public functions
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\u003e\u003ccode\u003eGvrPointerInputModuleImpl\u003c/code\u003e implements the \u003ccode\u003eGvrPointerInputModule\u003c/code\u003e and handles pointer events in VR.\u003c/p\u003e\n"],["\u003cp\u003eIt uses a \u003ccode\u003eGvrBasePointer\u003c/code\u003e to interact with objects and a \u003ccode\u003eGvrPointerScrollInput\u003c/code\u003e for scroll events.\u003c/p\u003e\n"],["\u003cp\u003eThe module can be configured to be active only in VR mode or all the time.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods for deactivating the module, checking if the pointer is over a game object, and processing input.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can access properties like \u003ccode\u003eCurrentEventData\u003c/code\u003e, \u003ccode\u003eEventExecutor\u003c/code\u003e, \u003ccode\u003eModuleController\u003c/code\u003e, \u003ccode\u003ePointer\u003c/code\u003e, \u003ccode\u003eScrollInput\u003c/code\u003e, and \u003ccode\u003eVrModeOnly\u003c/code\u003e to control and customize the behavior of the module.\u003c/p\u003e\n"]]],["The `GvrPointerInputModuleImpl` manages pointer input in VR. Key actions include processing input for each frame, determining if the pointer is over a game object, and deactivating the input module. It utilizes properties like `CurrentEventData` (for recent frame data), `EventExecutor` (for event execution), `ModuleController` (for input module control), `Pointer` (for responding to pointer events), `ScrollInput` (for routing scroll events), and `VrModeOnly` (to determine input activation). The module can be activated or deactivated based on VR mode.\n"],null,["# GvrPointerInputModuleImpl Class Reference\n\nGvrPointerInputModuleImpl\n=========================\n\nImplementation of [GvrPointerInputModule](/vr/reference/unity/class/GvrPointerInputModule#classGvrPointerInputModule).\n\nSummary\n-------\n\n| ### Properties ||\n|----------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [CurrentEventData](#classGvrPointerInputModuleImpl_1a3292937485369a38991dee424440beff) | [GvrPointerEventData](/vr/reference/unity/class/GvrPointerEventData#classGvrPointerEventData) Gets `PointerEventData` from the most recent frame. |\n| [EventExecutor](#classGvrPointerInputModuleImpl_1a33ae1b0112b23239b7ab23536662d53d) | [IGvrEventExecutor](/vr/reference/unity/interface/IGvrEventExecutor#interfaceIGvrEventExecutor) Gets or sets an interface for executing events. |\n| [ModuleController](#classGvrPointerInputModuleImpl_1a85e53feae1e646786984a03af75bfb82) | [IGvrInputModuleController](/vr/reference/unity/interface/IGvrInputModuleController#interfaceIGvrInputModuleController) Gets or sets an interface for controlling the actual input module. |\n| [Pointer](#classGvrPointerInputModuleImpl_1a2c4599f089cd121238d9601603c883ad) | [GvrBasePointer](/vr/reference/unity/class/GvrBasePointer#classGvrBasePointer) Gets or sets the [GvrBasePointer](/vr/reference/unity/class/GvrBasePointer#classGvrBasePointer) which will be responding to pointer events. |\n| [ScrollInput](#classGvrPointerInputModuleImpl_1af4e33788b79ac4554dda5e6a2e1f1f1f) | [GvrPointerScrollInput](/vr/reference/unity/class/GvrPointerScrollInput#classGvrPointerScrollInput) Gets or sets the [GvrPointerScrollInput](/vr/reference/unity/class/GvrPointerScrollInput#classGvrPointerScrollInput) used to route Scroll events through `EventSystem`. |\n| [VrModeOnly](#classGvrPointerInputModuleImpl_1a1240d57d7b2311de395ab40aae68e618) | `bool` Gets or sets a value indicating whether the pointer input is active in VR Mode only or whether it is always active. |\n\n| ### Public functions ||\n|----------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------|\n| [DeactivateModule](#classGvrPointerInputModuleImpl_1a9a171e6d259719d99abb7a10b6a136c3)`()` | `void` Deactivates this input module. |\n| [IsPointerOverGameObject](#classGvrPointerInputModuleImpl_1a28255b2ffb178da2b12168f0e212d9d6)`(int pointerId)` | `bool` Determines whether the pointer is over a game object. |\n| [Process](#classGvrPointerInputModuleImpl_1a1c4c073a20812d7a9a90e300d9936d05)`()` | `void` Process the input for the current frame. |\n| [ShouldActivateModule](#classGvrPointerInputModuleImpl_1ae69c7b687418358fd55d2323258acab7)`()` | `bool` Gets or sets a value indicating whether this module should be activated. |\n\nProperties\n----------\n\n### CurrentEventData\n\n```c#\nGvrPointerEventData CurrentEventData\n``` \nGets `PointerEventData` from the most recent frame.\n\nThe `PointerEventData` data from the most recent frame. \n\n### EventExecutor\n\n```c#\nIGvrEventExecutor EventExecutor\n``` \nGets or sets an interface for executing events.\n\nAn event executor interface for executing events. \n\n### ModuleController\n\n```c#\nIGvrInputModuleController ModuleController\n``` \nGets or sets an interface for controlling the actual input module.\n\nThe module controller interface for controlling the input module. \n\n### Pointer\n\n```c#\nGvrBasePointer Pointer\n``` \nGets or sets the [GvrBasePointer](/vr/reference/unity/class/GvrBasePointer#classGvrBasePointer) which will be responding to pointer events.\n\nThe [GvrBasePointer](/vr/reference/unity/class/GvrBasePointer#classGvrBasePointer) which will be responding to pointer events. \n\n### ScrollInput\n\n```c#\nGvrPointerScrollInput ScrollInput\n``` \nGets or sets the [GvrPointerScrollInput](/vr/reference/unity/class/GvrPointerScrollInput#classGvrPointerScrollInput) used to route Scroll events through `EventSystem`.\n\nThe [GvrPointerScrollInput](/vr/reference/unity/class/GvrPointerScrollInput#classGvrPointerScrollInput) used to route Scroll events through `EventSystem`. \n\n### VrModeOnly\n\n```c#\nbool VrModeOnly\n``` \nGets or sets a value indicating whether the pointer input is active in VR Mode only or whether it is always active.\n\nSet to false if you plan to use direct screen taps or other input when not in VR Mode.\n\nSet this to `true` to make input active only in VR Mode. Set to `false` to make input active all of the time.\n\nPublic functions\n----------------\n\n### DeactivateModule\n\n```c#\nvoid DeactivateModule()\n``` \nDeactivates this input module. \n\n### IsPointerOverGameObject\n\n```c#\nbool IsPointerOverGameObject(\n int pointerId\n)\n``` \nDetermines whether the pointer is over a game object.\n\n\u003cbr /\u003e\n\n| Details ||\n|-------------|-------------------------------------------------------------------------------------------------------------------|\n| Parameters | |-------------|--------------------------| | `pointerId` | The pointer id to check. | |\n| **Returns** | Returns `true` if this instance is pointer over game object the specified `pointerId`. Returns `false` otherwise. |\n\n### Process\n\n```c#\nvoid Process()\n``` \nProcess the input for the current frame. \n\n### ShouldActivateModule\n\n```c#\nbool ShouldActivateModule()\n``` \nGets or sets a value indicating whether this module should be activated.\n\n\u003cbr /\u003e\n\n| Details ||\n|-------------|-----------------------------------------------------------------------|\n| **Returns** | Returns `true` if this module should be activated, `false` otherwise. |"]]