You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Packages/com.unity.inputsystem/Documentation~/Architecture.md
+21-4Lines changed: 21 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,11 @@ The Input System can also send data back to the native backend in the form of [c
15
15
16
16
# Input System (low-level)
17
17
18
-
The diagram below reads top-to-bottom as a layered pipeline: the native **platform backends** at the bottom feed the **InputManager**, which uses **layouts** to build **devices** whose state is stored in **Input State Memory** at the top.
18
+
The diagram of the low-level Input System reads top-to-bottom as a layered pipeline:
19
+
20
+
1. The native platform backends at the bottom feed the InputManager.
21
+
1. The InputManager uses layouts to build devices.
22
+
1. The device's state is stored in Input State Memory at the top.
19
23
20
24
```mermaid
21
25
flowchart TB
@@ -94,9 +98,19 @@ The low-level system code also contains structs which describe the data layout o
94
98
95
99
# Input System (high-level)
96
100
97
-
The high-level system is easiest to understand in two parts: how input flows through the system at **runtime**, and how Actions are **authored as assets**. Both are shown below for a single player; each additional player gets its own `InputActionState` and a cloned `InputActionAsset` with its own device list and binding mask.
101
+
The high-level system is easiest to understand in two parts:
102
+
103
+
- How input flows through the system at runtime.
104
+
- How actions are authored as assets.
105
+
106
+
The diagram shows both parts for a single player; each additional player gets its own `InputActionState` and a cloned `InputActionAsset` with its own device list and binding mask.
98
107
99
-
**Runtime data flow** — a Device control's state is written into Input State memory, a State Change Monitor notices the change, the `InputActionState` is updated, and the resulting Action fires a callback on the `PlayerInput` component in the scene:
108
+
The first diagram is for the runtime data flow:
109
+
110
+
1. A device's control state is written into Input State memory.
111
+
1. A State Change Monitor notices the change.
112
+
1. The `InputActionState` is updated.
113
+
1. The resulting action fires a callback on the `PlayerInput` component in the scene.
100
114
101
115
```mermaid
102
116
flowchart LR
@@ -140,7 +154,10 @@ flowchart LR
140
154
class IU,PI go;
141
155
```
142
156
143
-
**Asset structure** — an `InputActionAsset` contains Maps, Actions, and Bindings. At runtime these populate the arrays inside the `InputActionState` shown above (`m_State`):
157
+
The second diagram is for the asset structure:
158
+
159
+
1. An `InputActionAsset` contains maps, actions, and bindings.
160
+
1. At runtime these populate the arrays inside the `InputActionState` shown in the previous diagram (`m_State`).
0 commit comments