C# Class Borodar.ReorderableList.SerializedPropertyAdaptor

Reorderable list adaptor for serialized array property.

This adaptor can be subclassed to add special logic to item height calculation. You may want to implement a custom adaptor class where specialised functionality is needed.

List elements are not cloned using the System.ICloneable interface when using a UnityEditor.SerializedProperty to manipulate lists.

Inheritance: IReorderableListAdaptor
显示文件 Open project: PhannGor/unity3d-rainbow-folders Class Usage Examples

Public Properties

Property Type Description
FixedItemHeight float

Public Methods

Method Description
Add ( ) : void
BeginGUI ( ) : void
CanDrag ( int index ) : bool
CanRemove ( int index ) : bool
Clear ( ) : void
DrawItem ( Rect position, int index ) : void
DrawItemBackground ( Rect position, int index ) : void
Duplicate ( int index ) : void
EndGUI ( ) : void
GetItemHeight ( int index ) : float
Insert ( int index ) : void
Move ( int sourceIndex, int destIndex ) : void
Remove ( int index ) : void
SerializedPropertyAdaptor ( UnityEditor.SerializedProperty arrayProperty ) : System

Initializes a new instance of SerializedPropertyAdaptor.

SerializedPropertyAdaptor ( UnityEditor.SerializedProperty arrayProperty, float fixedItemHeight ) : System

Initializes a new instance of SerializedPropertyAdaptor.

this ( int index ) : UnityEditor.SerializedProperty

Gets element from list.

Method Details

Add() public method

public Add ( ) : void
return void

BeginGUI() public method

public BeginGUI ( ) : void
return void

CanDrag() public method

public CanDrag ( int index ) : bool
index int
return bool

CanRemove() public method

public CanRemove ( int index ) : bool
index int
return bool

Clear() public method

public Clear ( ) : void
return void

DrawItem() public method

public DrawItem ( Rect position, int index ) : void
position UnityEngine.Rect
index int
return void

DrawItemBackground() public method

public DrawItemBackground ( Rect position, int index ) : void
position UnityEngine.Rect
index int
return void

Duplicate() public method

public Duplicate ( int index ) : void
index int
return void

EndGUI() public method

public EndGUI ( ) : void
return void

GetItemHeight() public method

public GetItemHeight ( int index ) : float
index int
return float

Insert() public method

public Insert ( int index ) : void
index int
return void

Move() public method

public Move ( int sourceIndex, int destIndex ) : void
sourceIndex int
destIndex int
return void

Remove() public method

public Remove ( int index ) : void
index int
return void

SerializedPropertyAdaptor() public method

Initializes a new instance of SerializedPropertyAdaptor.
public SerializedPropertyAdaptor ( UnityEditor.SerializedProperty arrayProperty ) : System
arrayProperty UnityEditor.SerializedProperty Serialized property for entire array.
return System

SerializedPropertyAdaptor() public method

Initializes a new instance of SerializedPropertyAdaptor.
public SerializedPropertyAdaptor ( UnityEditor.SerializedProperty arrayProperty, float fixedItemHeight ) : System
arrayProperty UnityEditor.SerializedProperty Serialized property for entire array.
fixedItemHeight float Non-zero height overrides property drawer height calculation.
return System

this() public method

Gets element from list.
public this ( int index ) : UnityEditor.SerializedProperty
index int Zero-based index of element.
return UnityEditor.SerializedProperty

Property Details

FixedItemHeight public_oe property

Fixed height of each list item.

Non-zero value overrides property drawer height calculation which is more efficient.

public float FixedItemHeight
return float