SerializedPropertyAdaptor Class

Rotorz ReorderableList

SerializedPropertyAdaptor Class
Reorderable list adaptor for serialized array property.
Inheritance Hierarchy
SystemObject  Rotorz.ReorderableListSerializedPropertyAdaptor

Namespace: Rotorz.ReorderableList
Assembly: Editor.ReorderableList (in Editor.ReorderableList.dll) Version: 0.0.0.0 (0.3.0.0)
Syntax
public class SerializedPropertyAdaptor : IReorderableListAdaptor
public class SerializedPropertyAdaptor
	implements IReorderableListAdaptor

The SerializedPropertyAdaptor type exposes the following members.

Constructors
  NameDescription
Public methodSerializedPropertyAdaptor(SerializedProperty)
Initializes a new instance of SerializedPropertyAdaptor.
Public methodSerializedPropertyAdaptor(SerializedProperty, Single)
Initializes a new instance of SerializedPropertyAdaptor.
Top
Methods
  NameDescription
Public methodAdd
Add new element at end of list.
Public methodBeginGUI
Occurs before any list items are drawn.
Public methodCanDrag
Determines whether an item can be reordered by dragging mouse.
Public methodCanRemove
Determines whether an item can be removed from list.
Public methodClear
Clear all elements from list.
Public methodDrawItem
Draws main interface for a list item.
Public methodDrawItemBackground
Draws background of a list item.
Public methodDuplicate
Duplicate existing element.
Public methodEndGUI
Occurs after all list items have been drawn.
Public methodGetItemHeight
Gets height of list item in pixels.
Public methodInsert
Insert new element at specified index.
Public methodMove
Move element from source index to destination index.
Public methodRemove
Remove element at specified index.
Top
Fields
  NameDescription
Public fieldFixedItemHeight
Fixed height of each list item.
Top
Properties
  NameDescription
Public propertyarrayProperty
Gets the underlying serialized array property.
Public propertyCount
Gets count of elements in list.
Public propertyItem
Gets element from list.
Top
Remarks

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 ICloneable interface when using a SerializedProperty to manipulate lists.

See Also