Input Schemes
FPS/MMO/click-to-move/ARPG/drag-axis/cards control schemes over the intent SPI. Client-only.
Unity seams you implement 3
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.
IInputAxisProvider unity SPI
Which WORLD direction a rightward drag moves the pawn along — the one thing a drag scheme cannot know for itself. A lane runner returns a fixed axis; a pawn bound to a curve returns the tangent at its current position, so "drag right" always means "further along the curve". The game implements it over whatever it is steering; until it binds one, +X is used.
-
Vector3 CurrentThe world-space direction a positive (rightward) drag should move along. Need not be normalized; a zero vector means "no axis right now" and the scheme emits no movement.
IInputCameraProvider unity SPI
The camera used to turn pointer positions into world rays. Default: Camera.main.
-
Camera CurrentThe 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 ActiveThe currently active scheme.
-
void SetScheme(ControlScheme scheme)Switches schemes at runtime (also writable via the options asset).