Unshift

Adds a value at the start of an array.

Node id array/unshift

The Unshift node outputs a new array: array with value added as its first element. The other elements move up by one index.

Inputs

NameTypeDefaultNotes
arrayArray<T>—generic
valueT—generic

Outputs

NameTypeNotes
arrayArray<T>generic

Behaviour

  • A new array. The connected array is unchanged, so other nodes using it still see it without the new element.
  • Nothing connected to array counts as an empty array: the result holds only value.

Errors

  • value must be connected: being a generic pin, it can't be set in the property inspector.
  • Push: adds at the end instead.
  • Shift: takes the first element out.
© 2026 Wirepaint