Array Editing

From Unify Community Wiki
Jump to: navigation, search

Author: Daniel Brauer

Built-in arrays are the only reasonable way to allow artists and level designers to define lists of things without touching code or making your own editor extensions. However, editing long arrays can get tedious if you are relying on things being in a certain order and you need to make changes later.

There are two undocumented functions you can use when editing arrays:

Edit > Delete (Command-Delete on Mac OS X; Delete or Shift-Delete on Windows)

Remove the selected element in an array. The element will be deleted, the array length will be reduced by one and subsequent elements will each have their indices reduced by one.

Edit > Duplicate (Command-D on Mac OS X; Ctrl-D on Windows)

Duplicate the selected element. The element will be duplicated, with the duplicate inserted after the selected element. The array length will be increased by one, and all subsequent elements will have their indices increased by one.

I have no idea why these functions are undocumented, but they can save your day when you realize that element 4 in an array of length 50 shouldn't be there.

Personal tools