Array Editing

From Unify Community Wiki
Revision as of 18:29, 29 April 2012 by Skoobiedu (Talk | contribs)

Jump to: navigation, search

Author: Daniel Brauer

Builtin 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:

Command-Delete (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.

Command-D (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 and only available via shortcut, but they can save your day when you realize that element 4 in an array of length 50 shouldn't be there.

Personal tools