Essential Attributes [Lockable]


Lock serialized fields in the Inspector with a padlock button to prevent unwanted edits — works with arrays, lists, and individual fields.


by Foxal Face


Price History +

The [Lockable] attribute adds a clickable padlock icon next to any serialized field in the Inspector. Once locked, the field becomes read-only, protecting it from unintended changes — perfect for shared or sensitive data.

It works on any serialized field, including arrays and lists, with additional control to lock:

  • Only the array container (arraySize, ➕/➖)
  • Only the elements
  • Or both (via the ArrayTarget parameter)

When a list is locked, Unity’s default controls like ➕, ➖, and drag-and-drop are hidden or disabled — making the list truly non-editable in the Inspector.

The locking is purely visual and non-persistent: the field returns to its locked state after reloads or recompilation, ensuring a safe-by-default editing experience.


💡 Try Before You Buy

This attribute is also included in the Essential Attributes asset — or try [ElementName]and [TexturePreview] for free on the Unity Asset Store.