Voxel Play Input Controllers

Modified on Thu, 08 Apr 2021 at 01:07 PM

Voxel Play provides two input controllers called keyboard/mouse controller and dual-touch controller.

The controllers are a prefab that can contain anything, including of course the script that takes care of reading input.

They're assigned in Voxel Play Environment inspector, under "Default Assets" section:



Voxel Play will instantiate one or another controller prefab based on the active platform (desktop or mobile). It does it automatically when game starts.

You can test the look of the mobile input controller in Unity Editor by enabling the option "Preview Mobile UI In Editor" under the "Optional Game Features" of Voxel Play Environment inspector.


If you open the Voxel Play PC Input Controller prefab, you will find a KeyboardMouseController script which exposes the keymap. You can change the keymap in this prefab (or using GetComponent() and setting the property to your desired keycode at runtime):



To learn how you can provide or customize the input controllers, please check the section "Custom Input Controllers".



Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article