PropertyValueEntryAlias

A polymorphic alias for a PropertyValueEntry instance, used to implement strongly typed polymorphism in Odin.

namespace Sirenix.OdinInspector.Editor
{
public abstract class PropertyValueEntryAlias : IPropertyValueEntry, IValueEntryActualValueSetter
}

Requirements

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

Events

Definition Description
OnChildValueChanged An event that is invoked during ApplyChanges(), when any child values have changed.
OnValueChanged An event that is invoked during ApplyChanges(), when any values have changed.

Properties

Return Type Definition Description
Type BaseValueType The base type of the value entry. If this is value entry represents a member value, this is the type of the member. If the value entry represents a collection element, this is the element type of the collection.
PropertyContextContainer Context The context container of this property.
bool DictionaryChangedFromPrefab Whether this value entry has had its dictionary values changes from its prefab counterpart.
bool IsAlias Whether this value entry is an alias, or not. Value entry aliases are used to provide strongly typed value entries in the case of polymorphism.
bool IsEditable Whether this value entry is editable or not.
bool IsMarkedAtomic Whether this type is marked as an atomic type using a IAtomHandler.
bool ListLengthChangedFromPrefab Whether this value entry has had its list length changed from its prefab counterpart.
Type ParentType The type from which this value entry comes. If this value entry represents a member value, this is the declaring type of the member. If the value entry represents a collection element, this is the type of the collection.
InspectorProperty Property The property whose values this value entry represents.
SerializationBackend SerializationBackend

The actual serialization backend for this value entry, possibly inherited from the serialization backend of the root property this entry is a child of.

Note that this is *not* always equal to SerializationBackend.

string TargetReferencePath If this value entry has the override type Reference, this is the path of the property it references.
Type TypeOfValue The most precise known contained type of the value entry. If polymorphism is in effect, this will be some type derived from BaseValueType.
PropertyValueCategory ValueCategory The value category of this value entry.
bool ValueChangedFromPrefab Whether this value entry has been changed from its prefab counterpart.
int ValueCount The number of parallel values this entry represents. This will always be exactly equal to the count of WeakTargets.
bool ValueIsStrongList Whether the type of this entry implements IList`1.
bool ValueIsValidDictionary Whether the type of this entry implements IDictionary`2.
bool ValueIsWeakList Whether the type of this entry implements IList.
PropertyValueState ValueState The special state of the 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
bool ApplyChanges() Applies the changes made to this value entry to the target objects, and registers prefab modifications as necessary.
IDictionaryHandler GetDictionaryHandler() Gets an IDictionaryHandler for this value entry, used to apply modifications and get contextual data from value entries representing a dictionary.
PropertyListValueEntryChanger GetListValueEntryChanger() Gets a PropertyListValueEntryChanger for this value entry, used to apply modifications to value entries representing a list.
bool ListIsReadOnly() Whether any of the list instances that this value entry represents are read only.
void SetActualValue(int, Object) Sets the actual value of a value entry, for a given selection index.
void Update() Updates the values contained in this value entry to the actual values in the target objects, and updates its state (override, type of value, etc.) accordingly.
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 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.