Reading one field of a struct needs an own Expand node today, even when the graph already knows the struct type (typed lists since #254, typed variables and Pack/Expand since #253).
Goal
Like Unreal's "Split Struct Pin":
Right-click on an output pin that can carry a struct: Split into fields when the graph knows the type, Split as … for every other struct asset.
The output is replaced by item.Name, item.Amount, … each with the kind of its field.
Right-click on a field pin: Recombine.
Field pins follow the struct asset like a typed Expand (add, remove, rename, delete asset).
Renaming a variable carries the split along.
At runtime the node still produces the whole value, a field pin reads its field.
Limits
Outputs only, one level, behavior graphs only.
Reading one field of a struct needs an own `Expand` node today, even when the graph already knows the struct type (typed lists since #254, typed variables and `Pack`/`Expand` since #253).
## Goal
Like Unreal's "Split Struct Pin":
- Right-click on an output pin that can carry a struct: **Split into <Type> fields** when the graph knows the type, **Split as …** for every other struct asset.
- The output is replaced by `item.Name`, `item.Amount`, … each with the kind of its field.
- Right-click on a field pin: **Recombine**.
- Field pins follow the struct asset like a typed `Expand` (add, remove, rename, delete asset).
- Renaming a variable carries the split along.
- At runtime the node still produces the whole value, a field pin reads its field.
## Limits
Outputs only, one level, behavior graphs only.
Done in 38e0f65, wiki: Structs (Split outputs), note in Behaviors.
Right-click on an output pin: Split into fields when the type is known (typed variables, typed Pack/Expand, fields of another split, item of For each/Find/Match/Item at over a typed list), Split as … for any other struct asset.
Right-click on a field pin: Recombine. Edges of the replaced pins are dropped, one undo brings them back.
Field pins follow the struct asset (add, remove, rename keeps the edge, deleting the asset keeps the last fields). The delete dialog counts splits.
Renaming a variable carries the split along. Copy/paste keeps it.
Limits: outputs only, one level, behavior graphs only.
Tests: ./check.sh 185 files, 2706 tests, CHECK EXIT 0. e2e 1-6, 54, 55: 303 checks passed. New port-splits.test.ts (12 tests), e2e 6z-vi (3 checks, real mouse, the run logs 7). Counter-checks in unit and browser all fail as expected.
Done in 38e0f65, wiki: *Structs* (Split outputs), note in *Behaviors*.
- Right-click on an output pin: **Split into <Type> fields** when the type is known (typed variables, typed `Pack`/`Expand`, fields of another split, `item` of `For each`/`Find`/`Match`/`Item at` over a typed list), **Split as …** for any other struct asset.
- Right-click on a field pin: **Recombine**. Edges of the replaced pins are dropped, one undo brings them back.
- Field pins follow the struct asset (add, remove, rename keeps the edge, deleting the asset keeps the last fields). The delete dialog counts splits.
- Renaming a variable carries the split along. Copy/paste keeps it.
- Limits: outputs only, one level, behavior graphs only.
Tests: `./check.sh` 185 files, 2706 tests, CHECK EXIT 0. e2e 1-6, 54, 55: 303 checks passed. New `port-splits.test.ts` (12 tests), e2e 6z-vi (3 checks, real mouse, the run logs 7). Counter-checks in unit and browser all fail as expected.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Reading one field of a struct needs an own
Expandnode today, even when the graph already knows the struct type (typed lists since #254, typed variables andPack/Expandsince #253).Goal
Like Unreal's "Split Struct Pin":
item.Name,item.Amount, … each with the kind of its field.Expand(add, remove, rename, delete asset).Limits
Outputs only, one level, behavior graphs only.
Done in
38e0f65, wiki: Structs (Split outputs), note in Behaviors.Pack/Expand, fields of another split,itemofFor each/Find/Match/Item atover a typed list), Split as … for any other struct asset.Tests:
./check.sh185 files, 2706 tests, CHECK EXIT 0. e2e 1-6, 54, 55: 303 checks passed. Newport-splits.test.ts(12 tests), e2e 6z-vi (3 checks, real mouse, the run logs 7). Counter-checks in unit and browser all fail as expected.