API reference
Every PadPlay type, member and setting on one page. Filter by name or meaning.
PadPlayHost
The PC side, one per scene. It listens for phones, receives their input and sends them button layouts, vibration and video. It also provides the URL in the QR code.
GetPad— Returns that player's PadPlayPad.PlayerReady— Raised when input starts to arrive, once per join or resume. From here on GetPad returns the pad, so spawn the character here. H.264 video appears about 0.1–0.3 s later (no need to wait for it before starting play).PlayerRemoved— Raised when the slot is free for good. The pad is already gone by then. Remove the character here.Pulse— One vibration of a fixed length. The phone times it, so a hitch in the game does not stretch it. A continuous vibration from SetHaptics resumes afterwards.SetHaptics— Keeps vibrating at this strength until the next call.SetLayout— Shows a different button layout to one player, sent on the next frame. It is kept per slot until StopHost, so a resumed player, or a later one on the same slot, gets it too.Recenter— Makes the player's current direction forward. The pad's attitude and the Gyro Camera / Gyro Pointer reading it are recentered together; they blend, so nothing jumps. Also raises Recentered.Touch.SetPlayerTarget— Makes that player's touches hit the given camera's view. For split screen or a second display. There is also SetPlayerTarget(slot, displayIndex, viewportRect), and ClearPlayerTarget(slot) to undo it.GetPlayerState— The slot's state now.PlayerSlots— Joined slots (ascending) and their count. Players waiting to reconnect are not included.PlayerJoined— Raised when a phone joins and gets a slot. No input yet.PlayerLeft— Raised when the phone disconnects. Whether the slot and the pad are kept depends on the reason.PlayerAway— Raised when the phone's app leaves the game's screen and when it comes back. The phone has already let go of every button and finger. The SDK does not pause the game: decide here (PadPlayAwayPause is a ready-made pause screen).GetPresence— Whether the player's phone app is on the game's screen (Here, Glance, Away). Same as pad.Presence and pad.IsAway.Recentered— Raised when the forward is reset. By then the pad and the Gyro Camera / Gyro Pointer are already blending.ConnectionQualityChanged— Raised when the link gets better or worse. The SDK lowers the video by itself but shows players nothing; show your own hint ("use 5 GHz Wi-Fi") from here.ScreenRotationChanged— Raised when the phone's screen rotation changes.JoinUriChanged— Raised when the URL for the QR code changes (StartHost, RenewToken, StopHost, or a new PC address). Not needed with QR View.ConnectionHintChanged— Raised when the hint under the QR code changes. Use it to show the hint in your own UI instead of QR View. Raised after CheckPcAsync even when Show Connection Hints is off.TouchReceived / AttitudeReceived / ButtonsReceived— Raised for each raw packet from the phone. uGUI events and PadPlayPad usually cover this. With Touch's Send Ui Events off, touches arrive only here.Settings— The Inspector values, from code.AcceptNewPlayers— Off: new phones are refused; players returning to a held slot still get in. For example, off during a match. Same value as Settings.Players.AcceptNewPlayers, effective at once.NetworkSettings— Low-level connection values, read on StartHost; usually left alone. The one people change is RenewGraceMs: how long joined phones may still come back with the old QR after RenewToken.SetPhoneOverlay— Sets text and boards the phone draws over the video. They do not move with the Gyro Camera's correction, so they suit scores and crosshairs. Kept per slot and resent on join and resume, so you may set it before the player arrives. Usually done through Phone Overlay.VideoStatus— How video is sent (graphics API path, encoder, each player's codec), or why it cannot be, as text for people. Empty without video.GetVideoChoice— Whether the player gets H.264 or JPEG, and why.RequestVideoStats— Collects the video sending numbers (fps, bitrate, loss, how often quality was lowered…) and passes them to callback on the main thread a frame or more later. The picture-repair numbers are included: every few seconds the phone compares its picture with the PC's and asks for a key frame when they differ (newer app versions only).GetConnectionQuality— The player's link quality now. Changes raise ConnectionQualityChanged.ConnectionHint— The hint under the QR code when this PC stops phones. The host checks the PC by itself when the QR appears, when the PC's address changes and after a fix (about 5 s, on another thread). IsCheckingPc is true while it checks.FixConnectionHintAsync— Does what the hint's button does. Call it only from a button the player pressed (QR View's button calls it). The game changes no setting; it only opens Windows' pages.CheckPcAsync— Checks whether Windows lets this program (the Unity Editor, in the Editor) receive. About 5 s on another thread; changes and shows nothing. The last result stays in PcCheck.GetConnectionDiagnosis— The most likely reason phones cannot connect. The SDK shows it nowhere; use it in your own help screen.Diagnostics— The host's record (PadPlayDiagnostics). Updated on the main thread in the host's Update.TryGetPoseView— What the phone reports about a Gyro Camera's picture: motion-to-photon time and the correction it applied.CreateSupportReport— One text to send with a support question: versions, PC and GPU driver, settings, video path, network and firewall, each phone's numbers, the event record, and a session code to match it with the phone app's report. User name, PC name, token and key, network names and the like are removed; the last line says what.AutoStart— On: listening starts in Start. Off: call StartHost() yourself.StartHost— Starts and stops listening. Stopping disconnects everyone (PlayerLeft, then PlayerRemoved with Stopped). When you stop Play in the Editor with Keep Phones Across Play on, phones wait and come back to the same numbers on the next Play.IsRunning— Whether it is listening, the UDP port in use, and the URL in the QR code.RenewToken— Makes a new token and key, so a new QR code. New phones cannot join with the old one; joined phones stay.Kick— Removes the phone without holding its slot (PlayerLeft and PlayerRemoved with Bye follow).TryGetPlayer— TryGetPlayer gives the joined player's info (as in PlayerReady); GetCapabilities gives what its app can do.GetScreenRotation— The phone's screen rotation in degrees, and the clock offset and round trip to the phone. When the layout locks the orientation and the phone reports something else, the rotation is corrected from gravity.KeepAcrossScenes— On: phones stay connected while you load other scenes. Read in Awake. A Host in a scene loaded later hands its settings to the kept Host and stays idle whatever this value is, so the scene also works on its own.ActiveHost— ActiveHost is the Host that holds the connection (the kept Host or this one). Every member of this Host already goes there; you need it only to subscribe from objects that outlive the scene. KeptHost is the Host kept across scenes.SdkVersion— The package version, the protocol version checked against the app, and the host clock.
PadPlayView
Sends a camera or RenderTexture to phones as their own screen. PadPlay SDK only, not in Lite.
SourceCamera— The camera to send. The SDK creates its targetTexture, so the picture goes to the phone only. On URP, use a Base camera. SourceTexture wins when set.SourceTexture— A RenderTexture you draw, sent instead of a camera. The video size is the texture's size.PlayerSlot— Who gets it. -1 (AllPlayers) sends the same picture to everyone. It is encoded once while the players' connections are alike; a player whose Wi-Fi stays much slower gets a separate encoder (Max Encoders Per View).Width / Height— Video size with a camera, in px (16 or more). Not used with SourceTexture.FrameRate— Encoding fps cap. 0 = 60.MaxBitrateKbps— Bitrate cap in kbps. 0 = 2500. With Adaptive Video on, the host lowers it from here to suit the Wi-Fi.MatchPhoneAspect— Matches the width to the phone's aspect ratio (height stays). Only when sending to one player.UseAsTouchTarget— Makes this camera the player's touch target: tapping the picture presses the UI shown there.TouchCamera— The camera touches hit. With a RenderTexture, the camera that draws into it. Empty = Source Camera.GetPlayerView— The View shown to the player now (an extension method on the host).
PadPlayGyroCamera
Turns a camera with the player's phone. Send the camera's picture to the same player (a PadPlay View with this camera as Source Camera) and the phone becomes a window to look around with; the phone hides the delay by turning the picture just before showing it.
PlayerSlot— Whose phone turns this camera. For two or more players, one component per camera with different numbers.View— The PadPlay View that sends this camera. Empty = the View whose Source Camera is this camera.FieldOfView— Vertical field of view of what the phone shows, in degrees. Smaller = zoomed in. Setting it writes Settings.FieldOfView.YawOffsetDegrees— Yaw added on top of the phone (degrees, + = right), e.g. drag to look behind. Not hidden by the phone's correction.BaseRotation— The camera's local rotation for forward. Set from localRotation in Awake.ScreenPointToRay— A world ray through the tap. For a PadPlay touch it uses the camera of the frame the player was looking at, so it stays right while the phone turns fast (the last 256 frames are kept).ResetForward— Makes the phone's current heading this camera's forward (yaw only; gravity stays down). For the whole player, use host.Recenter.Settings.OverscanPercent— Extra picture rendered on each side while the delay is hidden, as % of the visible size. More hides faster turns but leaves fewer pixels for the visible part (10% = 83%).Settings.PhoneCorrection— Lets the phone turn the picture to hide the delay. Turn off only to compare.Settings.Predict— Predicts the attitude at render time from the angular velocity, up to the host's Attitude › Max Extrapolation Ms.Settings.Smoothing— Smoothing (0 to 0.99). Only for a camera whose picture does not go to that player (for example a camera on the PC screen); not used while the delay is hidden.Settings.RecenterOnConnect— RecenterOnConnect: recenter on join and resume. FollowPadRecenter: follow the player's recenter (host.Recenter, a Recenter button, the corner long-press). FollowScreenRotation: follow the phone's screen rotation.IsCorrectingDelay— Whether the phone hides this camera's delay: true when this camera is the Source Camera of a PadPlay View sent to the same player. Shown in the Inspector too.VisibleViewportRect— The part the phone actually shows (inside the overscan). Put UI meant for the phone inside it; text that must not move with the picture goes in a Phone Overlay.TryGetView— Motion-to-photon and correction of what the phone shows now (same as host.TryGetPoseView(PlayerSlot)). HasAttitude: whether any attitude has arrived; the camera turns only after that.Step— Turns the camera for this frame. Called in LateUpdate while AutoUpdate is on (default); turn it off only to call it in your own order.
PadPlayGyroPointer
Point the phone at the screen like a remote and where it points becomes a point on screen, for crosshairs and menu cursors. Twisting the wrist does not move it.
PlayerSlot— Whose phone points, as a slot number. For two or more players, add one component per player.ViewportPosition— The point, 0 to 1 like the viewport (y = 0 at the bottom). (0.5, 0.5) is forward; it stops at the edges.IsPointing— Whether the last update read the phone's attitude. false with nobody on the slot, while reconnecting, or before the first attitude. Fade the cursor and cancel presses while false.GetRay— A ray from camera through the point, to hit 3D objects.GetScreenPosition— The point in screen pixels (origin at the bottom left).Reticle— Optional UI that follows the point: its anchors are set to the point within its parent.ResetForward— Makes the current pose the center for this pointer only (blends over Recenter Blend Ms). For the whole player, use host.Recenter.Settings.Axis— Which way of the phone points. DeviceTop: the short edge with the camera, like a remote (the same held flat or tilted). TopEdge: the display's top edge. Back: the back. Auto: chosen at each recenter (flat = top edge, upright = back).Settings.HorizontalRangeDegrees— How far to swing the phone to move the point edge to edge, left–right and bottom–top. Smaller = more sensitive.Settings.Reference— What becomes the center on recenter. Full: where the phone points now (both axes). Yaw: left–right only; level is the center height.Settings.Smoothing— Smoothing (0 to 0.99) and the blend time in ms after a recenter. Small shakes show on a pointer, so a stronger value than for the camera may suit it.Settings.FollowPadRecenter— FollowPadRecenter: follow the player's recenter. CalibrateOnConnect: recenter on join and resume. FollowScreenRotation: swinging right moves right in landscape too.TryGetForward— Keeps the point in place across scenes: read this pointer's forward with TryGetForward, keep it, and give it to the next scene's pointer with StartFrom before its first frame. ForwardCount changes with every new forward.
PadPlayQrView
Shows the QR code on a Raw Image and redraws it when the URL changes. In Play mode, when this PC is found to block phones, a strip with one line and a button appears under it (hidden while a phone is connected).
Caption— Optional Text or TextMeshPro text with the game name. Turn on Show Uri in the Inspector to show the URL too.ShownHint— The hint in the strip now. The button is Firewall settings, Open settings or Retry, and calls host.FixConnectionHintAsync(). After Firewall settings, the strip says what to press in the page that opened.Refresh— Redraws from the current JoinUri. Not usually needed: it redraws itself when the URL changes.Texture— The QR texture shown now and the URL in it. null while stopped.
PadPlayStatusView
Writes the list of phones into a Text or TextMeshPro text: one line per player with number, model, state, seconds since the last input and ping. For checking on devices; lines of players who left stay (rewritten when the slot comes back).
Target— The Text or TextMeshPro text to write. Empty = the one on this GameObject.Rows— The values behind each line (PlayerSlot, Model, Os, State, LeftReason, LastInputKind, LastInputHostMs), for your own display.Refresh— Refresh rewrites now (normally every Refresh Interval Seconds). BuildText returns the text (rich text with colors). The language follows the host's Display Language.
PadPlayAwayPause
While a joined player's phone is away or disconnected (the host waits for the same phone), it pauses the game under a blurred picture of it with "Paused" and "Please reconnect your phone", and goes on when everyone is back. The SDK pauses a game only where this is placed. Works with Built-in and URP.
PauseOnGlance— Also pause for a glance (the notification shade or the app's own question over the game). Off (default): only Away and a dropped connection.IsPaused— Whether it pauses now (IsAnyPaused: any of them) and the slots it waits for. Hold what Time.timeScale does not stop (input read directly, unscaled time) with it.Paused— Called when the pause screen appears and goes (after time and audio were paused / given back). Use them for Video Players or your own timers.設定— Pause Time = Time.timeScale 0 (physics, animation, Time.deltaTime); Pause Audio = AudioListener.pause. Both give back the earlier values. Blur Background off = a dark screen. Empty Title / Message = "Paused" / "Please reconnect your phone" (in Japanese, PAUSE and its Japanese message), in the host's Display Language, or Language with Use Host Language off (Auto = the system's). Japanese is drawn with a Japanese font of the system unless Font is set.
PadPlayPhoneOverlay
Sends the uGUI Text, TextMeshPro and Image under this RectTransform as a layer the phone draws over the video. This RectTransform's rectangle is the phone's video area (for a Gyro Camera, anchor it to VisibleViewportRect). Change the texts from scripts as usual; only changes are sent.
PlayerSlot— Whose phone shows it. -1 (AllPlayers) = everyone.HideInPicture— Hides this layer (and lets clicks through) in the game's own picture. Off = it is drawn twice: in the video and by the phone.RefreshSeconds— Seconds between reads of the uGUI (0 = every frame). Refresh() reads now.送れる物— Text, size, alignment, bold and italic, color, and the rich text tags <b> <i> <color> (others are removed). An Image is sent as a plain colored board, not its sprite (use characters such as + or ● as marks). Up to 64 items, each text up to 1024 UTF-8 bytes.
PadPlayRaycaster
Use it instead of the Canvas's Graphic Raycaster, not next to it. Transparent parts of Images are not hit and pass through to what is behind, for phone touches and the mouse alike. Touch works without it.
AlphaThreshold— Image pixels with alpha below this are not hit. 0 = same as Graphic Raycaster.WarnUnreadableTexture— An Image whose texture has Read/Write off cannot be tested for alpha and is hit as a rectangle; this warns once per texture. Fix it with Advanced › Read/Write on the texture.
PadPlayDebugOverlay
Shows player count, each player's state, round trip and held buttons in a corner of a built game. While shown, the report key saves a support report and copies it. Use it to get reports from players. It uses no Canvas, so your UI is unaffected.
ToggleKey— The key that shows and hides it (an Input System Key), and whether it is shown. Key.None = no key.ReportKey— While shown, this key saves a report. The overlay then shows "Report saved and copied. Send it to the game's developer: " and the file's path (in the host's Display Language). SaveReport() does the same.BuildText— The text shown. Apart from the report lines and the key hint it is English. A Gyro Camera player gets a line such as window: m2p 48 ms fix 3.2°.
PadPlayPad
Each phone is one Input System Gamepad, so <Gamepad>/… bindings and PlayerInput just work. Created on PlayerReady, removed on PlayerRemoved.
attitude— The phone's attitude after calibration, in Unity's axes. Upright with the screen facing you is identity. ReadValue() gives a Quaternion; bind it as <PadPlayPad>/attitude.angularVelocity— Rotation speed in rad/s, on the camera's local axes.IsConnected— false while waiting to reconnect. The pad stays; the attitude holds and the buttons are released.IsAway— true while the phone's app is not on the game's screen (Away). Presence is Here, Glance or Away. While not Here the phone sends no input (buttons released, the attitude holds).GetButton— A button by layout id. 0 to 13 are the Gamepad buttons (0 = buttonSouth, 8 = dpad.up); 14 to 31 are your own (<PadPlayPad>/custom14 … custom31).recenter— The player asked to recenter. The SDK has already done it; use it for a sound or a hint.RecenterCount— How many times the attitude was recentered. It changes in the same update as the new attitude, so code that turns things with attitude can re-align on that frame without a jump.Recenter— Same as host.Recenter(PlayerSlot, mode).SetMotorSpeeds— Vibrates. A phone has one motor, so the strength is the larger value. 0, 0 stops. PauseHaptics, ResumeHaptics and ResetHaptics work as usual.PlayerSlot— 0-based slot (show + 1). The same after a resume.ButtonBits— Held buttons as bits by layout id (14 to 31 included).
PadPlayPointerEventData
The uGUI event data of a phone touch (and of PadPlayScreenPointer). It is a PointerEventData, so in any handler eventData is PadPlayPointerEventData p tells you who touched.
PlayerSlot— The 0-based slot of the player who touched.PhonePosition— Finger position on the phone, 0 to 1 with y = 0 at the top. position is this mapped to the target screen's pixels.FingerId— The finger's number on that phone (0 to 31). -1 for PadPlayScreenPointer events.ViewPoseSeq— The Gyro Camera frame the player was looking at when tapping. gyroCamera.ScreenPointToRay(eventData) uses it.
PadPlayScreenPointer
Turns one player's "point on the screen" and "pressed or not" into standard uGUI pointer events (Enter, Exit, Down, Up, Click, drags). For pressing UI with something other than a finger on the phone, such as a Gyro Pointer cursor. A plain C# class, not a component; it draws nothing and reads no input. Main thread only.
Process— Call once per frame.Cancel— Ends the press without a click and clears hover. Call it when your component is disabled or the player leaves.OverClickable— Whether something clickable is under the point, the object under it, and whether it is pressed. For the cursor's look.Data— The event data it sends. null before the first Process.GetPointerId— The pointerId per player. It never overlaps the mouse or phone fingers, so several players and the mouse can press different buttons at once. FingerId in its events is always -1.
PadPlayButtonLayout
The buttons and sticks shown on the phone, as an asset or from code. For everyone, set Host › Buttons › Layout; for one player, host.SetLayout.
Create— Makes a layout from code. It is not saved as an asset.Element— One button or stick.Orientation— How the phone is held while this layout is shown. Landscape and Portrait lock it; Auto follows how it is held. Changing it resends the layout.HitSlopMm— How far outside a button's drawn edge (mm, 0 to 10; 0 = exactly the shape) a finger still presses it; in a gap, the nearest edge wins. null = the phone's default (2.5 mm). An element's CustomHitSlop wins. Changing it resends the layout. Older apps ignore it and keep 2.5 mm.MarkChanged— Call after changing Elements from code; resent on the next frame. Not needed for edits in the Inspector.
PadPlayHostSettings
The Host's Inspector values (host.Settings). Each item and its default is under Settings (Inspector) on this page.
ApplyPreset— Sets Modules to a common combination; other values stay.SetEnabled— Turns modules on or off. Takes effect at once while running (the list told to phones changes from the next join).Players— The values of each Inspector group. Port, GameName, HostAddresses, LoopbackOnly, AnnounceOnLan, VerboseLog, DisplayLanguage and ShowConnectionHints are directly on this class.
PadPlayPcFix
Opens Windows' own settings pages. Neither PadPlay nor the game changes a setting or asks for administrator permission; the player makes the change in the page. Call it only from a button the player pressed (the strip under the QR code uses it through host.FixConnectionHintAsync()).
OpenFirewallSettings— Opens Windows Defender Firewall's "Allow an app through firewall" page. Show GetFirewallSettingsSteps() with it. Check the PC again with host.CheckPcAsync() when the player comes back.GetFirewallSettingsSteps— What to press in that page, two sentences for players. It names this game's .exe for the case it is not in the list yet.OpenNetworkSettings— Opens Windows' Settings → Network & internet, where the player makes the Wi-Fi a Private network.PadPlayPcFixResult— The result of FixConnectionHintAsync and the like. Opened: a Windows page was opened (the player makes the change). Done: the host was restarted. Cancelled: the administrator prompt was declined (Editor tools only). Failed: it could not be opened. NotSupported: not Windows.
PadPlayFirstPrompt
The first time a game listens on Windows, Windows may ask whether to allow it (not always). If the player cancels, phones cannot connect, so this gives you one sentence to show before that. PadPlay never shows it by itself. Not needed when your installer adds the firewall rule.
IsNeededAsync— Reads Windows' firewall rules (about 5 s, another thread) and returns true when this game has no rule yet. Call it before StartHost, for example on the title screen. Never throws.GetText— The sentence to show before the prompt.MarkShown— Remembers on this PC that it was shown (PlayerPrefs). MayBeNeeded is a quick guess without reading Windows: true in a Windows build that has not called MarkShown.
PadPlayDiagnostics
A read-only record of what the host received and sent (host.Diagnostics). PadPlay Debug, Debug Overlay and the report read it. It does not affect the game.
LastJoinAttempt— The last join attempt since the host started, and how many arrived. The Connection tab's Last connection attempt shows it.ButtonPressesReceived— Button presses that arrived from the phone (counted before the Input System) and presses the game could see. Comparing them tells "arrives but the game does not see it". The Why? lines in PadPlay Debug's Status tab use them.Players— Per-player records since the host started (players who left too): input rates (TouchRateHz, AttitudeRateHz, ButtonsRateHz), last input times, fingers down, the last attitude and buttons, link quality and more.CopyEvents— Copies the event record (oldest first, up to 512): joins, leaves, layouts, haptics, refused joins (JoinRejected), link quality, video, what the SDK did by itself (AutoAction), PadPlay warnings and errors.
PadPlayDeepCheck
Watches this PC's network adapters for a few seconds to find where a phone's packets stop (Windows' Packet Monitor). Windows Unity Editor only; asks for administrator permission once. In a build it returns Problem NotSupported at once (a game never asks for administrator permission). Usually run from Deep check in PadPlay Debug's Connection tab.
RunAsync— Watches for seconds to find where the phone's packets stop. Have the phone scan the QR code while it watches (Stage is Watching). Changes nothing, never throws.Stage— The stage now (Idle, Asking, Watching, Reading), seconds left, Stop() to end the watch now, and the last result (also in the report's [check] section).
PadPlayEdition
Which edition this is, PadPlay SDK (paid) or PadPlay Lite (free). Lite has no second-screen video (PadPlay View). Everything else, the player count included, behaves the same; no time limit or watermark.
IsLite— true in Lite. Name is "PadPlay SDK" or "PadPlay Lite".
PadPlayTestPhone
A phone for your game's automated tests (Unity Test Framework, Play Mode). It joins the PadPlayHost inside this PC the way the app does, sends buttons, sticks, touches and tilt, and reads the layout, vibration and recenters the game sends. No phone or Wi-Fi needed. Namespace and assembly: PadPlay.Testing; add it to your test assembly's references. Never in a built game.
Connect— Joins and waits until the host raises PlayerReady (yield it in a [UnityTest]); it also waits for the host to start. Then check IsConnected; Error says why not. After Drop it comes back to the same slot.Disconnect— Disconnect = the app leaves: PlayerRemoved (Bye) at once. Drop = Wi-Fi drops: PlayerLeft, and the slot is held. Call Dispose at the end of the test.Press— Presses or releases a button; it stays pressed until Release. Unlike a real phone, it can press buttons that are not on the layout.SetStick— Moves LeftStick or RightStick (x right, y up, length up to 1). Vector2.zero centers it.TryPressAt— Presses what a finger at that position on the phone would press, decided as the app does (hit margin included). For a stick it only returns the id. false when nothing is there.TouchDown— Puts a finger (0 to 31) down, moves it, lifts it. Positions are 0 to 1 of the display area, (0, 0) at the top left. They arrive as uGUI pointer events, even over a button.SetAttitude— Sets how the phone is held, as pad.attitude reads it before recentering. The first attitude after joining becomes forward (Calibrate Yaw On Connect), so compare changes. RequestRecenter = the corner long-press.LayoutButtons— What the game sent: the last layout (LayoutButtons, LayoutCount, LayoutOrientation, LayoutHitSlopMm), the vibration now (HapticStrength, 0 = still) and counts (HapticCount, PulseCount), and recenter notices (RecenterCount).GoAway— Acts like the app leaving the game's screen: GoAway = screen off or another app (Away; the host keeps it connected for holdSeconds), LookAway = the notification shade (Glance), ComeBack = back. Each lets go of every input first. For an iPhone, which stops the app, call Drop after GoAway. ReportsAway = false before Connect acts like an app that does not report it.WaitUntil— Waits until condition is true or the time runs out (yield it in a [UnityTest]).
PadPlayPlayerColors
A color per player (P1 blue, P2 red, P3 green, P4 yellow … 8 colors, repeating). Status View, the preview's fingers and PadPlay Debug use the same colors, so you can tell whose input it is.
Get— The slot's color, and "#RRGGBB" for rich text.
Settings (Inspector)
In the same order as the Host Inspector.
- Max Players (
Settings.Players.MaxPlayers, default 4) — How many phones can join (1 to 64). - Resume Hold Seconds (
Settings.Players.ResumeHoldSeconds, default 300) — Seconds a dropped player's slot is held. The same phone coming back within it gets the same number; after it, PlayerRemoved. 0 = not held. - Accept New Players (
Settings.Players.AcceptNewPlayers, default on) — Off: new phones are refused (returning players get in). Same value as host.AcceptNewPlayers. - Calibrate Yaw On Connect (
Settings.Players.CalibrateYawOnConnect, default on) — On join and resume, the direction the phone faces becomes forward (the phone's heading reference changes on every launch). - Create Devices (
Settings.Players.CreateDevices, default on) — Creates a PadPlayPad (Gamepad) per player. Off = only raw events such as AttitudeReceived. - Keep Phones Across Play (
Settings.Players.KeepPhonesAcrossPlay, default on) — Editor only. When Play stops the phones wait, and on the next Play they come back with the same numbers without scanning. Built games make a new QR every time. - Modules (
Settings.Modules, default Touch, Attitude, Buttons, Video) — Features in use. The host drops input of unchecked modules and sends nothing for them. Preset: Touch only, Gyro controller, Second-screen controller. - Drag Threshold Mode (
Settings.Touch.DragThresholdMode, default EventSystem) — How the drag start distance is set: EventSystem = like the mouse, Pixels = Drag Threshold Px, PhoneMillimeters = Drag Threshold Mm on the phone (the same finger move on any screen). - Drag Threshold Mm / Px (
Settings.Touch.DragThresholdMm / DragThresholdPx, default 1.5 mm / 10 px) — Mm is used with Drag Threshold Mode PhoneMillimeters, Px with Pixels. - Raycast Only Player Screen (
Settings.Touch.RaycastOnlyPlayerScreen, default on) — Touches hit only the Raycasters of the player's own screen. Off = the frontmost hit of all Raycasters. - Stale Timeout Seconds (
Settings.Touch.StaleTimeoutSeconds, default 0) — Treat a finger as released after this many seconds without data. 0 = never (keep 0: the app does not send fingers that do not move). - Send Ui Events (
Settings.Touch.SendUiEvents, default on) — Turns touches into uGUI events. Off = only TouchReceived. - Click Speed Seconds (
Settings.Touch.ClickSpeedSeconds, default 0.3) — Longest gap between taps that counts as a double tap. - Player Targets (
Settings.Touch.PlayerTargets, default empty) — The screen each player's touches hit (a camera, or a display and rect). Players not listed use all of Display 1. In code: host.Touch.SetPlayerTarget. - Max Extrapolation Ms (
Settings.Attitude.MaxExtrapolationMs, default 150) — How long to predict with the angular velocity while no attitude arrives. Longer fills Wi-Fi gaps better but overshoots if the hand stops meanwhile. - Correction Ms (
Settings.Attitude.CorrectionMs, default 50) — Time to blend the prediction into a newly received attitude. 0 = snap at once. - Delay Buffer Ms (
Settings.Attitude.DelayBufferMs, default 0) — Delay used to interpolate between received attitudes. 0 = always the latest; 10 to 20 smooths normal jitter. - Smoothing (
Settings.Attitude.Smoothing, default 0) — Smoothing of pad.attitude (0 to 0.99). More = less shake, more lag. - Full Style (
Settings.Attitude.FullStyle, default KeepGravity) — How Full recentering works. KeepGravity removes the holding tilt (gravity stays down); KeepDeviceAxes makes the phone's axes the camera's. - Recenter Mode (
Settings.Attitude.RecenterMode, default Yaw) — How a Recenter button and the corner long-press recenter: Yaw = heading only, Full = the whole pose. - Allow Phone Recenter (
Settings.Attitude.AllowPhoneRecenter, default on) — Lets players recenter with a 1-second long press on the phone's top-left corner. Off = only game buttons and code. - Layout (
Settings.Buttons.Layout, default none (PadPlay Setup: stick, A, B)) — The layout on every phone. Empty = no buttons. Changes in Play mode are resent at once. - Allow Haptics (
Settings.Buttons.AllowHaptics, default on) — Off: nothing is sent and any ongoing vibration stops. - Haptic Strength Scale (
Settings.Buttons.HapticStrengthScale, default 1) — Multiplier (0 to 1) for every vibration, to even out devices. - Haptic Refresh Ms / Duration Ms / Min Change (
Settings.Buttons.HapticRefreshMs …, default 100 / 150 / 0.05) — How continuous vibration is sent: resend interval, length of one pulse (the phone stops by itself after it if the Host stops), and the change sent at once. - Codec (
Settings.Video.Codec, default Auto) — Auto = H.264, and JPEG for a phone that asks (slow H.264 decoding). Without an H.264 encoder (macOS, Linux, OpenGL) everyone gets JPEG. - Adaptive Video / Min Kbps / Priority / Min Fps / Min Scale (
Settings.Video.AdaptiveVideo …, default on / 300 / Quality / 30 / 0.5) — Raises and lowers bitrate, fps and size to suit the Wi-Fi. Priority Quality keeps the size and lowers fps first; Smoothness keeps fps and lowers the size first. - Total Max Kbps (
Settings.Video.TotalMaxKbps, default 0) — Bitrate cap for everyone together; each player gets at most this divided by the player count. 0 = no cap. - Max Encoders Per View (
Settings.Video.MaxEncodersPerView, default 2) — The most H.264 encoders one view uses (1 to 4). When one player's Wi-Fi stays much slower than the others', that player and the others get separate encoders, so the others keep their quality. Each extra encoder adds GPU work. 1 = everyone shares one, at the quality of the weakest link. - Jpeg Scale / Fps / Quality (
Settings.Video.JpegScale …, default 0.5 / 30 / 75) — JPEG size (fraction of the View), fps and starting quality. - Pacing Mbps (
Settings.Video.PacingMbps, default 20) — Sends each frame's pieces at this rate so a key frame does not flood the Wi-Fi. 0 = all at once. - Max Playout Frames (
Settings.Video.MaxPlayoutFrames, default 2) — Most frames a phone waits to smooth uneven arrival, only while it is uneven. 0 = never wait. - Use Ltr Recovery (
Settings.Video.UseLtrRecovery, default on) — Repairs lost video with small recovery frames instead of key frames when the encoder supports it. - Prefer Readback (
Settings.Video.PreferReadback, default off) — Reads every frame back to the CPU even on Direct3D 11 / 12. A workaround when the GPU path misbehaves; slower. - Auto Prefer Readback (
Settings.Video.AutoPreferReadback, default on) — On a PC where the GPU-path picture keeps breaking after repairs, switch to readback by itself. It lasts for the rest of the run (each Play in the Editor starts over); the reason shows in PadPlay Debug and the report. Players see nothing. - Mode (
Settings.Preview.Mode, default EditorOnly) — Shows each phone's screen on Game view Display 2, 3… By default only in the Editor. - Player Displays / Show Touches / Show Buttons / Overlay Opacity / Show Caption (
Settings.Preview.PlayerDisplays …, default 2, 3, 4, 5 / on / on / 0.6 / on) — Display number per player (0 = not shown), and how fingers, buttons and the caption are overlaid. - Port (
Settings.Port, default 7780) — The UDP port. If busy, the next free one is used and put in the QR. - Game Name (
Settings.GameName, default empty (Product Name)) — Game name shown on the phone and with the QR code. - Host Addresses (
Settings.HostAddresses, default auto) — IP addresses put in the QR code. Set the Wi-Fi address first on PCs with a VPN or virtual adapters. - Loopback Only (
Settings.LoopbackOnly, default off) — Listens on 127.0.0.1 only, for tests. Phones cannot connect and no firewall prompt appears. - Announce On LAN (
Settings.AnnounceOnLan, default on) — While running, tells this PC's Wi-Fi / LAN that a PadPlay game is here (send only). A phone that cannot connect listens for it to tell whether the PC or the Wi-Fi stops it. Only a name made from the QR token (nobody can join with it), the port and the PC's address go out. - Verbose Log (
Settings.VerboseLog, default off) — Logs joins, leaves, layouts, video and the join URL to the Console. - Display Language (
Settings.DisplayLanguage, default Auto) — Language of the text players see (under the QR code, Status View, Debug Overlay's report lines). Auto = Japanese on Japanese systems, otherwise English. Separate from the Editor language. - Show Connection Hints (
Settings.ShowConnectionHints, default on) — When this PC stops phones, shows one line and a button under the QR code and tells the phone app. For that the host checks the PC when the QR appears (about 5 s, another thread). Off: the API (CheckPcAsync and so on) still works.