Skip to main content

Locking layers in the Unity scene

·204 words·1 min

Every now and then, while working Unity, I find that they changed something. It’s Like Déjà vu in the Matrix, but in a good way. This time I found that you can lock assets in place in the scene view. Its really weird because I was just lamenting about this, and “poof”, there is it! Its incredibly useful when you are laying out a 2D scene or UI against a comp where you are trying to match the source image your artist gave you. The problem was that, while placing or moving items, I would continuously selecting the layout image and then moving that. OMG, the pain! Now, I just make a layer in my project called “layout”, place my source image on that and then lock it. I make my source image a Unity sprite because A) its super easy to drag and drop into the scene and B) the layer locking only works with Unity native objects… not with 2D Tool Kit sprites. So Here is how you do it

Nift Unity layer pop-up for locking and hiding layers
Nift Unity layer pop-up for locking and hiding layers

  • Click the “Layers” drop-down in your scene view
  • Click the little lock next to the layer
  • Enjoy (preferably with a cup of coffee)