Version 3.3.1.2

PropertyValueEntry<TValue> class

Namespace: Sirenix.OdinInspector.Editor
Assembly: Sirenix.OdinInspector.Editor
public abstract class PropertyValueEntry<TValue> : PropertyValueEntry, IPropertyValueEntry<TValue>, IPropertyValueEntry, IDisposable, IValueEntryActualValueSetter<TValue>, IValueEntryActualValueSetter
Represents the values of an InspectorProperty, and contains utilities for querying the values' type and getting and setting them.
Inheritance
See Also
  • Sirenix.OdinInspector.Editor.IPropertyValueEntry

Type Parameters

TValue

The type of the value.

Constructors

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

Fields

AtomHandler
If the type of the value is marked atomic, this an instance of an atom handler for the value type.
protected static readonly IAtomHandler<TValue> AtomHandler
EqualityComparer
An equality comparer for comparing values of type . This is gotten using GetEqualityComparerDelegate<T>().
public static readonly Func<TValue, TValue, bool> EqualityComparer
ValueIsMarkedAtomic
Whether the type of the value is marked atomic.
protected static readonly bool ValueIsMarkedAtomic
ValueIsPrimitive
Whether .is a primitive type; that is, the type is primitive, a string, or an enum.
protected static readonly bool ValueIsPrimitive
ValueIsValueType
Whether is a value type.
protected static readonly bool ValueIsValueType

Properties

AtomValuesArray
An array containing the current modified set of atomic values.
protected TValue[] AtomValuesArray { get; }
InternalValuesArray
An array containing the current modified set of values.
protected TValue[] InternalValuesArray { get; }
IsMarkedAtomic
Whether this type is marked as an atomic type using a Sirenix.OdinInspector.Editor.IAtomHandler.
public override bool IsMarkedAtomic { get; }
OriginalAtomValuesArray
An array containing the original set of atomic values.
protected TValue[] OriginalAtomValuesArray { get; }
OriginalValuesArray
An array containing the original values as they were at the beginning of frame.
protected TValue[] OriginalValuesArray { get; }
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.

public TValue SmartValue { get; set; }
ValueIsUnityObject
Whether TypeOfValue is derived from UnityEngine.Object.
protected bool ValueIsUnityObject { get; }
Values
Provides access to the strongly typed values of this value entry.
public IPropertyValueCollection<TValue> Values { get; }
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.

public override object WeakSmartValue { get; set; }
WeakValues
Provides access to the weakly typed values of this value entry.
public override sealed IPropertyValueCollection WeakValues { get; }

Methods

Initialize()
Initializes this value entry.
protected override void Initialize()
SetActualValueImplementation(Int32, TValue)
Sets the actual target tree value.
protected abstract void SetActualValueImplementation(int index, TValue value)
Parameters
System.Int32 index

TValue value

ValueIsPrefabDifferent(TValue, Int32)

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.

public bool ValueIsPrefabDifferent(TValue value, int index)
Parameters
TValue value

The value to check differences against.

System.Int32 index

The selection index to compare against.

Returns
System.Boolean

ValueIsPrefabDifferent(Object, Int32)

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.

public override bool ValueIsPrefabDifferent(object value, int index)
Parameters
System.Object value

The value to check differences against.

System.Int32 index

The selection index to compare against.

Returns
System.Boolean

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.

public override bool ValueTypeValuesAreEqual(IPropertyValueEntry other)
Parameters
Sirenix.OdinInspector.Editor.IPropertyValueEntry other

Returns
System.Boolean