Browse on the Asset Store »* This is an affiliate link, meaning we may earn a small commission if you purchase something through it, at no extra cost.
Share InputSystem Device
The Share InputSystem Device package allows sharing a single device with multiple players, making it easy to support more than one player per device. It includes 7 sample setups that demonstrate how to achieve this functionality, from the bare minimum to more complex scenarios.
This package solves the problem of supporting multiple players per device in Unity. It allows any device to support any number of players, works with Unity's default PlayerInput component, and is compatible with Unity's player join/left system and button rebinding system.
The package includes 7 game-kit style sample scenes that demonstrate the following:
* Bare minimum setup to achieve functionality * Multiple players can individually navigate over a single UI canvas * Rebinding buttons based on control scheme or player index * Splitting WASD and Arrow keys
Each setup builds on the last, making it easy to isolate only what's needed and copy/paste only what's needed.
The package also includes InputSystem prefabs for rebinding controls on shared devices and a shared device setup that shows players able to join and drop at runtime by pressing a key on bound sections of the device.
To use this package, you need to include UnityEngine.InputSystem in your project. Some scenes may also require TMPro (TextMeshPro) essentials.
The package is designed to make it easy to understand and implement the InputSystem's player input functionality, even for complex scenarios with multiple players sharing a single device.
Technical Details:
# Overview
UnityEngine.InputSystem allows you to share a single device with multiple players. (see https://docs.unity3d.com/Packages/com.unity.inputsystem@1.6/manual/PlayerInput.html ). Enabling setups such as 2 players using a single keyboard.
However, it's not easy to setup. Especially if you want to support using the InputSystems control rebinding and/or the ability to create the player only when they press a button on their shared section of the device.
# Functionalities included
* InputSystem demonstration of single device shared with multiple players. Keyboard in the example, but the setup works with any device. * InputSystem prefabs for rebinding controls on shared devices. * Shared device setup shows players able to join and drop at runtime by pressing a key on bound sections of the device.
# Dependencies
* This package requires including UnityEngine.InputSystem. * Some scenes need TMPro (TextMeshPro) essentials in your project.