Essential Attributes [Lockable] View on Asset Store (opens in new tab)

Package details

Latest version
1.0
Last updated
First released
Unity version
2021.3.27 or later
Package size
576 KB
Files
31
Views in the past week
0

Price tracking

Last checked
Tracked since
Lowest recorded
$6.99 on

Keywords

Essential Attributes [Lockable]

by Foxal Face (opens in new tab)

No ratings yet

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

Price $6.99

Buy on Asset Store (opens in new tab)

Affiliate link · Purchases support this site

Price history

Last 6 months

USD
Price history for Essential Attributes [Lockable], 6 months Current $6.99; lowest $6.99; highest $6.99 in this period. $0 $5 $10 Jun Jul Aug Sep Oct Nov

Asset preview

1 / 3

Essential Attributes [Lockable] screenshot 1

Essential Attributes [Lockable] screenshot 1

About this asset

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.

From the publisher's Asset Store listing.

Technical details

  • 🔒 Adds a padlock icon to serialized fields to toggle editability
  • 🧩 Works with any serializable type: primitives, Unity objects, structs, custom classes, etc.
  • 🧮 Compatible with arrays and lists
  • 🎛️ ArrayTarget enum to control lock scope:
    ・Array (array size & buttons)
    ・Elements
    ・Both
  • 🧱 When locked:
    ・Fields are grayed out
    ・arraySize is not editable
    ・➕/➖ buttons are hidden
    ・Drag & drop is blocked
  • 🔁 Lock state resets automatically on script reload or scene change
  • 🚫 Does not block runtime or scripted changes — Inspector-only
  • 🧠 Ideal for reducing accidental edits and improving team safety

⚠️ Internal Usage

  • Reflection
  • CustomEditor (UnityEngine.Object)

Compatibility

Render pipelines supported in each Unity version
Unity version Built-in URP HDRP Custom
2021.3.27f1 Compatible Compatible Compatible Compatible

As listed on the Asset Store.