Skip to main content

Class PlayerInputDataLoggable

An IDataLoggable that snapshots all active Unity Input System action maps at the moment the Collect method is called, producing a PlayerInputDataLog that captures every input value coherently.

[RequireComponent(typeof(PlayerInput))]
[DisallowMultipleComponent]
public class PlayerInputDataLoggable : MonoBehaviour, IDataLoggable

Inheritance​

Implements​

IDataLoggable

Remarks​

Polling all action maps in a single Collect call — rather than subscribing to each individual action event — guarantees that every input value in the log is from the same frame, making the snapshot internally consistent.

Only enabled maps are sampled so that inactive control schemes (e.g. keyboard when using the Fanatec wheel) do not pollute the log with stale zero values.

Methods​

Collect()​

Collects input data from the enabled action maps and returns it as a PlayerInputDataLog.

public DataLog Collect()

Returns​

DataLog — A PlayerInputDataLog containing the input data, or null if no data is available.