Infra

Input Schemes

FPS/MMO/click-to-move/ARPG/cards control schemes over the intent SPI. Client-only.

Unity package
com.crossplay.input
Depends on
movement
Shape
client-only · no server half

Unity seams you implement 2

The client half's sockets. Bind your implementation in the client context and Crossplay's client calls it — this is where your models, animators, UI and controls plug in.

IInputCameraProvider unity SPI

The camera used to turn pointer positions into world rays. Default: Camera.main.

  • Camera Current

    The active gameplay camera, or null.

IInputPawnLocator unity SPI

Where the local player's pawn IS — needed by point-targeted schemes (click-to-move, ARPG) to steer toward a world point. The game implements this over its avatar view; until it binds one, those schemes emit no movement (everything else works).

  • bool TryGetPosition(out Vector3 position)

    The local pawn's world position, when one exists.

Unity services you inject 1

Crossplay binds these in the client context. Inject and call them from your own MonoBehaviours and presenters.

IInputSchemes

The scheme registry + live selector. Bind YOUR game's IGameplayInput to this (one line in your installer) and pick the scheme in the options asset — or switch at runtime (a game with vehicles might run Fps on foot and Arpg in the tactical view). Every scheme emits the same abstract MovementIntent, so the wire, prediction, and server never know which is active.

  • ControlScheme Active

    The currently active scheme.

  • void SetScheme(ControlScheme scheme)

    Switches schemes at runtime (also writable via the options asset).