Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

SerializedProperty.MoveArrayElement

MoveArrayElement(srcIndex: int, dstIndex: int): bool;
bool MoveArrayElement(int srcIndex, int dstIndex);
def MoveArrayElement(srcIndex as int, dstIndex as int) as bool

Description

Move an array element from srcIndex to dstIndex.

The SerializedProperty must be pointed to an array.