• Manual
  • Scripting API
Show / Hide Table of Contents
  • ScriptableFramework
    • AnimatorList
    • AnimatorListPopulator
    • AnimatorReference
    • AnimatorReferencePopulator
    • AppEvent
    • AppEvent<T>
    • AppEventBase
    • AppEventListener
    • AppEventListener<T>
    • AppEventListenerBase
    • AppVersion
    • BoolEvent
    • BoolEventListener
    • BoolList
    • BoolResponse
    • BoolValue
    • BoundsEvent
    • BoundsEventListener
    • BoundsResponse
    • ColorEvent
    • ColorEventListener
    • ColorList
    • ColorResponse
    • ColorValue
    • DataString
    • DefaultState
    • Dragable
    • Extensions
    • FloatEvent
    • FloatEventListener
    • FloatList
    • FloatResponse
    • FloatValue
    • FoldoutAttribute
    • GameObjectList
    • GameObjectListPopulator
    • GameObjectReference
    • GameObjectReferencePopulator
    • InputValidation
    • IntEvent
    • IntEventListener
    • IntList
    • IntResponse
    • IntValue
    • IReferenceContainer
    • IValueContainer
    • MeshRendererList
    • MeshRendererListPopulator
    • MeshRendererReference
    • MeshRendererReferencePopulator
    • PathType
    • Platform
    • ReferenceItem<T>
    • ReferenceList<T>
    • ReleaseType
    • RuntimeItem<T>
    • RuntimeList<T>
    • RuntimeObject
    • RuntimeObjectManager
    • SceneAsset
    • SceneAsset.SceneLoadException
    • SearchableEnumAttribute
    • StateChange
    • StateMachine
    • StateMachineBase
    • StateMachineController
    • StateMachineReset
    • StateToggle
    • StringEvent
    • StringEventListener
    • StringList
    • StringResponse
    • StringValue
    • TransformList
    • TransformListPopulator
    • TransformReference
    • TransformReferencePopulator
    • ValueItem<T>
    • ValueList<T>
    • Vector2Event
    • Vector2EventListener
    • Vector2List
    • Vector2Response
    • Vector2Value
    • Vector3Event
    • Vector3EventListener
    • Vector3List
    • Vector3Response
    • Vector3Value
  • ScriptableFramework.CustomEditors
    • AppEventEditor
    • AppEventListenerEditor
    • AppVersionEditor
    • DataStringEditor
    • EditorOverride
    • EditorOverride.Cache
    • EditorOverride.Colors
    • FrameworkExtensions
    • RuntimeObjectEditor
    • RuntimeObjectManagerEditor
    • SceneAssetEditor
    • SearchableEnumDrawer
    • SearchablePopup
  • ScriptableFramework.Tests
    • AppEventGenericTests
    • AppEventGenericTests.ClearData
    • AppEventGenericTests.RaiseEvent
    • AppEventGenericTests.RegisterListener
    • AppEventGenericTests.UnregisterListener
    • AppEventListenerGenericTests
    • AppEventListenerGenericTests.OnEventRaised
    • AppEventListenerGenericTests.RegisterSelf
    • AppEventListenerGenericTests.UnregisterSelf
    • AppEventListenerTests
    • AppEventListenerTests.OnEventRaised
    • AppEventListenerTests.RegisterSelf
    • AppEventListenerTests.UnregisterSelf
    • AppEventTests
    • AppEventTests.ClearData
    • AppEventTests.RaiseEvent
    • AppEventTests.RegisterListener
    • AppEventTests.UnregisterListener
    • DataStringTests
    • ListenerResponder
    • ReferenceItemTests
    • ReferenceItemTests.ClearData
    • ReferenceItemTests.ClearWithForAssetReferencingOnly
    • ReferenceListTests
    • ReferenceListTests.ClearData
    • ReferenceListTests.ClearWithForAssetReferencingOnly
    • StateMachineTests
    • StateMachineTests.ClearData
    • StateMachineTests.ReapplyState
    • StateMachineTests.UpdateStateForAll
    • StateMachineTests.UpdateStateForIndex
    • StateMachineTests.UpdateStateForRange
    • StateMachineTests.UpdateStateForSingle
    • StateToggleTests
    • StateToggleTests.RespondToStateMachineChange
    • StateToggleTests.UpdateStateMachine
    • StringListTests
    • ValueItemTests
    • ValueItemTests.ClearData
    • ValueListTests
    • ValueListTests.ClearData

Class RuntimeList<T>

An abstract generic RuntimeObject which encapsulates the List class. Inherit from this class to create your own RuntimeList sub class. Give your class the CreateAssetMenu attribute to serialize an instance of it.

Inheritance
System.Object
RuntimeObject
RuntimeList<T>
ReferenceList<T>
ValueList<T>
Namespace: ScriptableFramework
Assembly: cs.temp.dll.dll
Syntax
public abstract class RuntimeList<T> : RuntimeObject, IList<T>
Type Parameters
Name Description
T

The type that will be stored in this object's internal generic List

Fields

items

A list of the elements in this object to be accessed externally via square bracket operator.

Declaration
protected List<T> items
Field Value
Type Description
List<T>

Properties

Count

Returns the number of elements currently in the list.

Declaration
public int Count { get; }
Property Value
Type Description
System.Int32

IsReadOnly

Will always return false.

Declaration
public bool IsReadOnly { get; }
Property Value
Type Description
System.Boolean

Item[Int32]

Declaration
public T this[int index] { get; set; }
Parameters
Type Name Description
System.Int32 index
Property Value
Type Description
T

Methods

Add(T)

Append an object to the end of this list.

Declaration
public virtual void Add(T item)
Parameters
Type Name Description
T item

The object to be added as an element.

AddRange(IEnumerable<T>)

Append objects to the end of this list.

Declaration
public virtual void AddRange(IEnumerable<T> items)
Parameters
Type Name Description
IEnumerable<T> items

A collection of objects to be appended to this list.

Clear()

Empty this list of all elements.

Declaration
public override void Clear()
Overrides
RuntimeObject.Clear()

Contains(T)

Declaration
public virtual bool Contains(T item)
Parameters
Type Name Description
T item
Returns
Type Description
System.Boolean

CopyTo(T[], Int32)

Declaration
public virtual void CopyTo(T[] array, int arrayIndex)
Parameters
Type Name Description
T[] array
System.Int32 arrayIndex

GetEnumerator()

Declaration
public IEnumerator<T> GetEnumerator()
Returns
Type Description
IEnumerator<T>

GetItem(Int32)

Read an element at a given index from this list. Called when the list is read from via square brackets.

Declaration
protected virtual T GetItem(int index)
Parameters
Type Name Description
System.Int32 index

The index of the element to be returned.

Returns
Type Description
T

The element object at the given index.

IndexOf(T)

Get the index of a given item if it exists as an element in this list.

Declaration
public virtual int IndexOf(T item)
Parameters
Type Name Description
T item
Returns
Type Description
System.Int32

Initialise(IEnumerable<T>)

Shorthand for calling Clear () and then AddRange (items).

Declaration
public virtual void Initialise(IEnumerable<T> items)
Parameters
Type Name Description
IEnumerable<T> items

A collection of objects to be appended to this list.

Initialise(Int32)

Shorthand for calling Clear () and then adding a number of empty/null objects.

Declaration
public abstract void Initialise(int newCount)
Parameters
Type Name Description
System.Int32 newCount

The number of empty/null objects to add.

Insert(Int32, T)

Declaration
public virtual void Insert(int index, T item)
Parameters
Type Name Description
System.Int32 index
T item

Remove(T)

If the item exists as an element in this list, remove it and shift the index of the elements after it down by one.

Declaration
public virtual void Remove(T item)
Parameters
Type Name Description
T item

The element to remove.

RemoveAt(Int32)

Declaration
public virtual void RemoveAt(int index)
Parameters
Type Name Description
System.Int32 index

Reset()

Calls Clear ().

Declaration
public override void Reset()
Overrides
RuntimeObject.Reset()

SetItem(Int32, T)

Pass an object back into the list and raise an event if an event was set in the inspector. Called when the list is written to via square brackets.

Declaration
protected virtual void SetItem(int index, T newItem)
Parameters
Type Name Description
System.Int32 index

The index of the element being written to.

T newItem

The new value to set in place of the previous value in the given index.

ToArray()

Declaration
public virtual T[] ToArray()
Returns
Type Description
T[]

ToList()

Declaration
public virtual List<T> ToList()
Returns
Type Description
List<T>
Back to top Generated by DocFX