bool IsEditable { get; set; }

robot_2Generated
code_blocksInput

Description

The IsEditable property of the SerializedProperty class indicates whether the property can be edited. This property is virtual, allowing derived classes to override its behavior if necessary.

Usage

Use the IsEditable property to determine if a serialized property can be modified. This is particularly useful when implementing custom editors or UI elements that need to respect the editability of properties.

Example

// Example of checking if a SerializedProperty is editable
SerializedProperty property = GetSerializedProperty();

if (property.IsEditable)
{
    // The property is editable, perform editing operations
    property.SetValue(newValue);
}
else
{
    // The property is not editable, handle accordingly
    // e.g., display a message or disable editing UI
}