Version 2.1.0.0

IPropertyValueEntry<TValue> interface

Namespace: Sirenix.OdinInspector.Editor
Assembly: Sirenix.OdinInspector.Editor
public interface IPropertyValueEntry<TValue> : IPropertyValueEntry, IDisposable
Represents the strongly typed values of an InspectorProperty, and contains utilities for querying the values' type and getting and setting them.

Type Parameters

TValue

Properties

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.

TValue SmartValue { get; set; }
Values
Provides access to the strongly typed values of this value entry.
IPropertyValueCollection<TValue> Values { get; }

Methods

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.

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

This website is brand new and built with the Odin 2.1 beta in mind. This means you might discover some features such as attribute expressions that are only available in the beta.

You can download the 2.1 beta from here and read the patch-notes here.