bool IsMultipleValues { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The IsMultipleValues property of the SerializedProperty class indicates whether the property holds multiple values. This can be useful when dealing with collections or arrays where the property might represent multiple entries. The values might all be the same, but the property will still return true if it holds more than one value.

Usage

Use the IsMultipleValues property to determine if a SerializedProperty instance contains multiple values. This can help in scenarios where you need to handle properties differently based on whether they represent a single value or multiple values.

Example

// Example usage of IsMultipleValues property
SerializedProperty property = ...; // Assume this is initialized

if (property.IsMultipleValues)
{
    // Handle the case where the property has multiple values
    foreach (var subProperty in property.MultipleProperties)
    {
        // Process each sub-property
    }
}
else
{
    // Handle the case where the property has a single value
}