Temp Unlock
Last updated
Last updated
In addition to fully unlocking a Prefab, you can unlock a Prefab temporarily. While this can sound very similar, it has a few differences.
Temp unlock displays the Prefab as if it were unlocked, without actually modifying its Locked property value. It's a great way to quickly make a few edits to a particular instance in the scene, then go back to locked state.
While a Prefab is temporarily unlocked, you can also operate on any of its children. Selecting another GameObject or asset will result in the Prefab re-locking again.
Only one Prefab instance at a time can be temporarily unlocked. Trying to temp unlock other instances will result in re-locking the first one.
You cannot temporarily unlock children of a temporarily unlocked Prefab.
To unlock a Prefab temporarily, simply click on the lock icon in the Inspector:
This unlocks the Prefab temporarily:
As soon as you focus the selection on another Prefab or GameObject, open another scene or enter Prefab Mode, the temp unlocked Prefab goes back to its locked state.
You can also explicitly re-lock the Prefab by clicking on the Temp Unlock button shown above.
You can temporarily unlock and re-lock a Prefab using the U key shortcut. This shortcut can be modified from Unity's Shortcut Manager.
Using a shortcut is a great way to re-lock a Prefab from one of its children.
Note: Some Prefabs cannot be temporarily unlocked. This can happen if they are already fully unlocked, or if locking has been disable altogether in the Project Settings.
When a Prefab cannot be temporarily unlocked it will display an unlocked icon but no button: