Class ActionMapData
A snapshot of every action in one InputActionMap, captured as a flat list of InputData entries and aggregated into PlayerInputDataLog.
[Serializable]
public class ActionMapData
Inheritance
Remarks
Grouping inputs by action map preserves the same hierarchy Unity's Input System uses
internally, so post-hoc analysis can distinguish a "Steer" action in the "Driving" map
from a "Steer" action in a "Menu" map without ambiguity. Each entry in
ActionMap_inputs is a float, keeping the serialised JSON flat and
backend-friendly — Vector2 actions are decomposed to .x/.y pairs at
capture time rather than being stored as nested objects.
Constructors
ActionMapData(string)
Initializes a new instance of the ActionMapData class.
public ActionMapData(string name)
Parameters
| Name | Type | Description |
|---|---|---|
name | string | The name of the action map. |
ActionMapData(InputActionMap)
Constructs a snapshot of map by reading the current value of
every action it contains.
public ActionMapData(InputActionMap map)
Parameters
| Name | Type | Description |
|---|---|---|
map | InputActionMap | The Unity Input System action map to sample. |
Remarks
Actions whose expectedControlType is Vector2 are decomposed into two
InputData entries suffixed .x and .y; all other actions
are read as float. This keeps every entry in
ActionMap_inputs a uniform scalar, matching the flat JSON schema the
backend expects.
Fields
ActionMap_inputs
The list of input data associated with this action map.
public List<InputData> ActionMap_inputs
Field Value
ActionMap_name
The name of the action map (e.g., "Gameplay").
public string ActionMap_name
Field Value
string
Methods
AddInputs(InputData)
Adds a new input data entry to this action map.
public void AddInputs(InputData input)
Parameters
| Name | Type | Description |
|---|---|---|
input | InputData | The input data to add. |
AddInputs(string, float)
Adds a single float-valued action entry.
public void AddInputs(string input_name, float input_value)
Parameters
| Name | Type | Description |
|---|---|---|
input_name | string | The action name as it appears in the Input System asset. |
input_value | float | The sampled value of the action. |
AddInputs(string, Vector2)
Adds a Vector2-valued action as two separate float entries suffixed .x and .y.
public void AddInputs(string input_name, Vector2 input_value)
Parameters
| Name | Type | Description |
|---|---|---|
input_name | string | The action name; suffixes are appended automatically. |
input_value | Vector2 | The sampled Vector2 value of the action. |
Remarks
Splitting into two scalar entries keeps the serialised JSON flat — the backend
receives "Steer.x": 0.5 and "Steer.y": -0.3 rather than a nested
object, which is consistent with how float actions are recorded.