PropertyValueEntry<TValue>

Represents the values of an InspectorProperty, and contains utilities for querying the values' type and getting and setting them.

namespace Sirenix.OdinInspector.Editor
{
public abstract class PropertyValueEntry<TValue> : PropertyValueEntry, IPropertyValueEntry<TValue>, IValueEntryActualValueSetter<TValue>
}

Requirements

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

See Also

Static Fields

Return Type Definition Description
IAtomHandler<TValue> AtomHandler If the type of the value is marked atomic, this an instance of an atom handler for the value type.
bool BaseValueIsStrongList Whether !:TValue implements IList`1.
bool BaseValueIsWeakList Whether !:TValue implements IList.
Func<TValue, TValue, bool> EqualityComparer An equality comparer for comparing values of type !:TValue. This is gotten using GetEqualityComparerDelegate<T>().
ValueGetter<TValue, int> StrongListCountGetter A delegate that gets the count of a strong list instance.
ValueGetter<TValue, bool> StrongListIsReadOnlyGetter A delegate that gets the count of a weak list instance.
bool ValueIsMarkedAtomic Whether the type of the value is marked atomic.
bool ValueIsPrimitive Whether !:TValue.is a primitive type; that is, the type is primitive, a string, or an enum.
bool ValueIsValueType Whether !:TValue is a value type.

Constructors

Definition Description
PropertyValueEntry() Initializes a new instance of the PropertyValueEntry<TValue> class.

Properties

Return Type Definition Description
TValue[] AtomValuesArray An array containing the current modified set of atomic values.
TValue[] InternalValuesArray An array containing the current modified set of values.
bool IsMarkedAtomic Whether this type is marked as an atomic type using a IAtomHandler.
TValue[] OriginalAtomValuesArray An array containing the original set of atomic values.
TValue[] OriginalValuesArray An array containing the original values as they were at the beginning of frame.
TValue SmartValue

A strongly typed smart value that represents the first element of the value entry's value collection, but has "smart logic" for setting the value that detects relevant changes and applies them in parallel.

This lets you often just use the smart value instead of having to deal with the tedium of multiple parallel values.

bool ValueIsUnityObject Whether TypeOfValue is derived from Object.
IPropertyValueCollection<TValue> Values Provides access to the strongly typed values of this value entry.
Object WeakSmartValue

A weakly typed smart value that represents the first element of the value entry's value collection, but has "smart logic" for setting the value that detects relevant changes and applies them in parallel.

This lets you often just use the smart value instead of having to deal with the tedium of multiple parallel values.

IPropertyValueCollection WeakValues Provides access to the weakly typed values of this value entry.

Methods

Return Type Definition Description
void Initialize() Initializes this value entry.
bool ListIsReadOnly() Whether any of the list instances that this value entry represents are read only.
void SetActualValueImplementation(int, TValue) Sets the actual target tree value.
bool ValueIsPrefabDifferent(Object, int)

Determines whether the value at the given selection index is different from the given prefab value, as is relevant for prefab modification checks.

If the value is a reference type, null and type difference is checked. If value is a value type, a comparer from GetEqualityComparerDelegate<T>() is used.

This method is best ignored unless you know what you are doing.

bool ValueIsPrefabDifferent(TValue, int)

Determines whether the value at the given selection index is different from the given prefab value, as is relevant for prefab modification checks.

If the value is a reference type, null and type difference is checked. If value is a value type, a comparer from GetEqualityComparerDelegate<T>() is used.

This method is best ignored unless you know what you are doing.

bool ValueTypeValuesAreEqual(IPropertyValueEntry)

Checks whether the values in this value entry are equal to the values in another value entry.

Note, both value entries must have the same value type, and must represent values that are .NET value types.