Input Scaler API
The Input Scaler API allows you to set your own custom scaling strategy - Luna Replay will then get the required input based on this scaling logic when required.
A single input point is turned into two instances of the same point; one for gameplay input, and one for UI input. The ScaleFunction
API is then called twice, one with uiPass
set to true, and with uiPass
set to false.
uiPass
== true: UI input scalinguiPass
== false: gameplay input scaling
public delegate Vector2 Scaler(Vector2 input, bool uiPass);
Scaler Luna.Replay.Api.Input.ScaleFunction {get; set;}
Example
Shifting the input by 200 pixels to the right for UI only.
Luna.Replay.Api.Input.ScaleFunction = ( input, uiPass ) => {
if ( uiPass ) {
input.x += 200;
}
return input;
};