Version: 2021.3
LanguageEnglish
  • C#

NonReorderableAttribute

class in UnityEngine

/

Inherits from:PropertyAttribute

/

Implemented in:UnityEngine.CoreModule

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Disables reordering of an array or list in the Inspector window.

By default, array or list script variables are presented with a UI control that allows array element reordering via drag handles to the left of element content. You can use [NonReorderable] attribute on a script array or list variable to disable this. When reordering is disabled, the Inspector shows arrays or lists with a simple UI control that has an array size followed by array elements.

using UnityEngine;

public class NonReorderableAttributeTest : MonoBehaviour { [NonReorderable] public int[] array; }

Inherited Members

Properties

orderOptional field to specify the order that multiple DecorationDrawers should be drawn in.