---
title: controller
framework: gamecontroller
role: symbol
role_heading: Instance Property
path: gamecontroller/gcvirtualcontroller/controller
---

# controller

The underlying controller object that you use to access input elements.

## Declaration

```swift
var controller: GCController? { get }
```

## Discussion

Discussion Use this property to either get the element’s input values directly, or set handlers to get callbacks with the input values that changed. If you don’t connect the virtual controller to the device using connect(), this property is nil.
