PropertyValueCollection<TValue>

Represents a strongly typed collection of values for a PropertyValueEntry<TValue> - one value per selected inspector target.

namespace Sirenix.OdinInspector.Editor
{
[DefaultMemberAttribute("Item")]
public sealed class PropertyValueCollection<TValue> : PropertyValueCollection, IPropertyValueCollection<TValue>, IList<TValue>, ICollection<TValue>, IEnumerable<TValue>
}

Requirements

Namespace: Sirenix.OdinInspector.Editor
Assembly: Sirenix.OdinInspector
Version: 1.0.6.1

See Also

Constructors

Definition Description
PropertyValueCollection(InspectorProperty, TValue[], TValue[], TValue[], TValue[]) Initializes a new instance of the PropertyValueCollection<TValue> class.

Properties

Return Type Definition Description
bool AreDirty Whether the values have been changed since MarkClean() was last called.
int Count The number of values in the collection.
bool IsSynchronized Gets a value indicating whether this instance is synchronized.
TValue Item Gets or sets the !:TValue at the specified index.
Object SyncRoot Gets the synchronization root object.
IImmutableList WeakOriginal The original values of the (loosely typed) value collection, such as they were immediately after the last Update() call.

Methods

Return Type Definition Description
bool Contains(Object) Determines whether the collection contains the specified value.
void CopyTo(Array, int) Copies the collection to an array.
void ForceMarkDirty() Marks the value collection as being dirty, regardless of any value changes.
void ForceSetValue(int, Object)

Force sets the value, ignoring whether it is editable or not.

Note that this will fail on list element value entries where ListIsReadOnly() is true on the parent value entry.

void ForceSetValue(int, TValue)

Force sets the value, ignoring whether it is editable or not.

Note that this will fail on list element value entries where ListIsReadOnly() is true on the parent value entry.

IEnumerator GetEnumerator() Gets an enumerator for the collection.
Object GetWeakValue(int) Gets the weakly typed value at the given index.
int IndexOf(Object) Gets the index of the given value, or -1 if the value was not found.
void MarkClean() Marks the value collection as being clean again. This is typically called at the end of the current GUI frame, during ApplyChanges().
void RevertUnappliedValues() Reverts the value collection to its origin values (found in !:Original) from the last Update() call, and marks the value collection as being clean again.
void SetWeakValue(int, Object) Sets the weakly typed value at the given index.