# IGvrInputModuleController Interface Reference

# IGvrInputModuleController

Interface for manipulating an input module used by `https://developers.google.com/vr/reference/unity/class/GvrPointerInputModuleImpl#classGvrPointerInputModuleImpl`.

## Summary

### Inheritance

Direct Known Subclasses:[GvrPointerInputModule](https://developers.google.com/vr/reference/unity/class/GvrPointerInputModule)

| ### Properties ||
|---|---|
| `https://developers.google.com/vr/reference/unity/interface/IGvrInputModuleController#interfaceIGvrInputModuleController_1ab8ed4a337d76e9ae166a073767afcad9` | `List< RaycastResult >` Gets the raycast result cache list. |
| `https://developers.google.com/vr/reference/unity/interface/IGvrInputModuleController#interfaceIGvrInputModuleController_1abda5c523905ac2508ab02970583762ea` | `EventSystem` Gets a reference to the event system. |

| ### Public functions ||
|---|---|
| `https://developers.google.com/vr/reference/unity/interface/IGvrInputModuleController#interfaceIGvrInputModuleController_1aa54cca806208be23fcc186a5bd61b618()` | `void` Deactivate the controller. |
| `https://developers.google.com/vr/reference/unity/interface/IGvrInputModuleController#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. |
| `https://developers.google.com/vr/reference/unity/interface/IGvrInputModuleController#interfaceIGvrInputModuleController_1a4be23fd19cd3b39fcf232bbb7c6eb197(List< RaycastResult > candidates)` | `RaycastResult` Return the first valid raycast result. |
| `https://developers.google.com/vr/reference/unity/interface/IGvrInputModuleController#interfaceIGvrInputModuleController_1afe012bb38366c9322d9c481a80ad9333()` | `BaseEventData` Gets a `BaseEventData` that can be used by the `EventSystem`. |
| `https://developers.google.com/vr/reference/unity/interface/IGvrInputModuleController#interfaceIGvrInputModuleController_1ac7c2a3fa3001c8da237a4de335e22556()` | `bool` Whether the controller should be activated. |

## Properties

### RaycastResultCache

```c#
List< RaycastResult > RaycastResultCache
```
Gets the raycast result cache list.

The raycast result cache list.

### eventSystem

```c#
EventSystem eventSystem
```
Gets a reference to the event system.

A reference to the event system.

## Public functions

### Deactivate

```c#
void Deactivate()
```
Deactivate the controller.

### FindCommonRoot

```c#
GameObject FindCommonRoot(
  GameObject g1,
  GameObject g2
)
```
Given two game objects, return a common root game object, or null if there is no common root.

<br />

| Details ||
|---|---|
| Parameters | |---|---| | `g1` | The first `GameObject`. | | `g2` | The second `GameObject`. | |
| **Returns** | The common root. |

### FindFirstRaycast

```c#
RaycastResult FindFirstRaycast(
  List< RaycastResult > candidates
)
```
Return the first valid raycast result.

<br />

| Details ||
|---|---|
| Parameters | |---|---| | `candidates` | The list of `RaycastResults` to search for the first Raycast. | |
| **Returns** | The first raycast. |

### GetBaseEventData

```c#
BaseEventData GetBaseEventData()
```
Gets a `BaseEventData` that can be used by the `EventSystem`.

<br />

| Details ||
|---|---|
| **Returns** | A `BaseEventData` that can be used by the `EventSystem`. |

### ShouldActivate

```c#
bool ShouldActivate()
```
Whether the controller should be activated.

<br />

| Details ||
|---|---|
| **Returns** | Returns `true` if the controller should be activated, `false` otherwise. |