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.
Interface for manipulating an input module used by GvrPointerInputModuleImpl
.
Summary
Inheritance
Direct Known Subclasses:
GvrPointerInputModule
Properties
|
RaycastResultCache
|
List< RaycastResult >
Gets the raycast result cache list.
|
eventSystem
|
EventSystem
Gets a reference to the event system.
|
Public functions
|
Deactivate()
|
void
Deactivate the controller.
|
FindCommonRoot(GameObject g1, GameObject g2)
|
GameObject
Given two game objects, return a common root game object, or null if there is no common root.
|
FindFirstRaycast(List< RaycastResult > candidates)
|
RaycastResult
Return the first valid raycast result.
|
GetBaseEventData()
|
BaseEventData
Gets a BaseEventData that can be used by the EventSystem .
|
ShouldActivate()
|
bool
Whether the controller should be activated.
|
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\u003eIGvrInputModuleController is an interface for manipulating input modules used by GvrPointerInputModuleImpl.\u003c/p\u003e\n"],["\u003cp\u003eIt provides access to the raycast result cache, the event system, and methods for deactivating the controller, finding a common root for game objects, and getting the first valid raycast result.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use this interface to control the behavior of input modules in VR applications built with Google VR SDK for Unity.\u003c/p\u003e\n"],["\u003cp\u003eThis interface includes methods to determine if the controller should activate and to get base event data.\u003c/p\u003e\n"]]],["The `IGvrInputModuleController` interface manages an input module, primarily handling raycasting and event system interactions. It provides a `RaycastResultCache` and access to the `eventSystem`. Key actions include `Deactivate` to stop the controller, `FindCommonRoot` to locate a shared parent of two GameObjects, `FindFirstRaycast` to get the initial valid raycast result from a list, `GetBaseEventData` for the `EventSystem`, and `ShouldActivate` to check if the controller should be active.\n"],null,["# IGvrInputModuleController Interface Reference\n\nIGvrInputModuleController\n=========================\n\nInterface for manipulating an input module used by [GvrPointerInputModuleImpl](/vr/reference/unity/class/GvrPointerInputModuleImpl#classGvrPointerInputModuleImpl).\n\nSummary\n-------\n\n### Inheritance\n\nDirect Known Subclasses:[GvrPointerInputModule](/vr/reference/unity/class/GvrPointerInputModule)\n\n| ### Properties ||\n|----------------------------------------------------------------------------------------------|-------------------------------------------------------------|\n| [RaycastResultCache](#interfaceIGvrInputModuleController_1ab8ed4a337d76e9ae166a073767afcad9) | `List\u003c RaycastResult \u003e` Gets the raycast result cache list. |\n| [eventSystem](#interfaceIGvrInputModuleController_1abda5c523905ac2508ab02970583762ea) | `EventSystem` Gets a reference to the event system. |\n\n| ### Public functions ||\n|--------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------|\n| [Deactivate](#interfaceIGvrInputModuleController_1aa54cca806208be23fcc186a5bd61b618)`()` | `void` Deactivate the controller. |\n| [FindCommonRoot](#interfaceIGvrInputModuleController_1a84c2345d492ad663a3a663f892b6e648)`(GameObject g1, GameObject g2)` | `GameObject` Given two game objects, return a common root game object, or null if there is no common root. |\n| [FindFirstRaycast](#interfaceIGvrInputModuleController_1a4be23fd19cd3b39fcf232bbb7c6eb197)`(List\u003c RaycastResult \u003e candidates)` | `RaycastResult` Return the first valid raycast result. |\n| [GetBaseEventData](#interfaceIGvrInputModuleController_1afe012bb38366c9322d9c481a80ad9333)`()` | `BaseEventData` Gets a `BaseEventData` that can be used by the `EventSystem`. |\n| [ShouldActivate](#interfaceIGvrInputModuleController_1ac7c2a3fa3001c8da237a4de335e22556)`()` | `bool` Whether the controller should be activated. |\n\nProperties\n----------\n\n### RaycastResultCache\n\n```c#\nList\u003c RaycastResult \u003e RaycastResultCache\n``` \nGets the raycast result cache list.\n\nThe raycast result cache list. \n\n### eventSystem\n\n```c#\nEventSystem eventSystem\n``` \nGets a reference to the event system.\n\nA reference to the event system.\n\nPublic functions\n----------------\n\n### Deactivate\n\n```c#\nvoid Deactivate()\n``` \nDeactivate the controller. \n\n### FindCommonRoot\n\n```c#\nGameObject FindCommonRoot(\n GameObject g1,\n GameObject g2\n)\n``` \nGiven two game objects, return a common root game object, or null if there is no common root.\n\n\u003cbr /\u003e\n\n| Details ||\n|-------------|-------------------------------------------------------------------------------------------------------------|\n| Parameters | |------|--------------------------| | `g1` | The first `GameObject`. | | `g2` | The second `GameObject`. | |\n| **Returns** | The common root. |\n\n### FindFirstRaycast\n\n```c#\nRaycastResult FindFirstRaycast(\n List\u003c RaycastResult \u003e candidates\n)\n``` \nReturn the first valid raycast result.\n\n\u003cbr /\u003e\n\n| Details ||\n|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Parameters | |--------------|---------------------------------------------------------------| | `candidates` | The list of `RaycastResults` to search for the first Raycast. | |\n| **Returns** | The first raycast. |\n\n### GetBaseEventData\n\n```c#\nBaseEventData GetBaseEventData()\n``` \nGets a `BaseEventData` that can be used by the `EventSystem`.\n\n\u003cbr /\u003e\n\n| Details ||\n|-------------|----------------------------------------------------------|\n| **Returns** | A `BaseEventData` that can be used by the `EventSystem`. |\n\n### ShouldActivate\n\n```c#\nbool ShouldActivate()\n``` \nWhether the controller should be activated.\n\n\u003cbr /\u003e\n\n| Details ||\n|-------------|--------------------------------------------------------------------------|\n| **Returns** | Returns `true` if the controller should be activated, `false` otherwise. |"]]