PadPlay

Get started in 5 minutes

From an empty project to a phone that moves things.

Video: Up and running in a minute (1:19)

You need

  1. Import the package

    Window → Package Manager → My Assets → PadPlay SDK → Download → Import

    The Welcome window opens. If it warns about the Input System, press Set to Both… and restart the Editor.

  2. Add to the scene

    GameObject → PadPlay → PadPlay Setup

    Adds the Host, QR code, player list and EventSystem in one go.

  3. Press Play

    A QR code appears at the bottom right of the Game view.

    If Windows asks, press Allow (on some Windows versions, Allow access).

    If a strip appears under the QR code, press its button as it says.

  4. Connect a phone

    Scan the QR code with the PadPlay app and tap Connect.

    The phone shows a stick and A and B buttons. Touches on the phone press your UI.

  5. Read the input

    Add the script below to a GameObject. Pressing A prints to the Console.

    using PadPlay;
    using UnityEngine;
    
    public class PadReader : MonoBehaviour
    {
        [SerializeField] PadPlayHost host;
    
        void Update()
        {
            PadPlayPad pad = host.GetPad(0);   // P1, or null
            if (pad == null || !pad.IsConnected)
                return;
            if (pad.buttonSouth.wasPressedThisFrame)
                Debug.Log("A pressed");
            transform.rotation = pad.attitude.ReadValue();
        }
    }