Skip to content
Georgios Papadoulis edited this page Oct 14, 2023 · 5 revisions

Welcome to the UnityInputTransfer wiki! This is just a simple guideline to get you started! Might update to a more thorough tutorial later!

First of all, instead of downloading the project, it might be better to create a new one, preferable using Unity 2021.3 LTS (due to 2022 having minor issues with the Editor).

Make sure to install the Input System from the Package Manager. You can either download Mirror or copy the version this project provides. Lastly, make sure to copy the Barebones and Input System Framework folders to your Assets folder.

The framework comes with a pre-made Input Action Asset Screenshot_13

There are also two example scenes, one for playing inside the Unity Editor or a build, called Test Server Scene and one for building on a smartphone, called Test Client Scene.

Check the DeviceServerInputControl component in the Device Server prefab. You can add Unity events there. You can also add events in code as indicated by the MoveController.cs script. If you change the map you'll need to hit the Self Initialize on the DeviceServerInputControl's Context menu. If you do that, you'll lose all the events you have manually connected. This might be resolved in later versions. Screenshot_19

For the Phone scene, it's set up so you'll connect with your PC with your IP in the local network and port 5000. Once you build it for the phone and connect, you should be able to move one of the Cubes with the virtual joysticks and control the other Cube's rotation. Also, notice how you can connect more than one devices in the DeviceClient menu. If the dropdowns aren't working correctly, it's because you're in Unity 2022. Check the various controller examples in the Controllers folder to make your own or modify them however you like! Screenshot_17

Clone this wiki locally