I am working on a new small utility to lock GameObjects in a scene so that you or others don’t move/scale/rotate objects by mistake.
This is obviously not the first utility to solve this problem and if you are just looking for a simple tool to lock a GameObject I would recommend the UnityLock (Unity Asset Store - The Best Assets for Game Making).
I made this for our own production, but wrapped it up nicely and plan to continue to support it.
Very useful, however I am having some issues using this together with Favourites Tab~~.~~ When you display the unlock icons in the hierarchy it is impossible to select it and lock the object. The Favourites Tab icon always wins and is enabled instead. No matter how many times I try to select the lock icon it doesn’t work and I am forced to do it manually through the menu system.
I came across a bug today while using GameObject Lock (v1.02). I have a couple of prefabs which I want to lock, but every time I press Play, and then return to the editor, the items are unlocked again. I tested this with a standard cube, same result. I then looked at the cache object, and noticed that it doesn’t update the list with Scene Objects. Is there a quick and simple fix for this?
Thank you!
EDIT: Also noticed that when I go to GameObject → Lock → Preferences, a black window opens and I get the following error:
radimoto: Can you give me a screenshot? I will add an option so it should work better with other plugins.
SoftwareBug: I can’t reproduce this. Can you give me some more info: Your version of Unity, target platform, and you development platform. I’ll look into it when I have more info.
My Unity version is: 4.2.1f4. Target is Windows, using Unity Windows.
I created a new project, and can’t seem to replicate it now. Thank you for your help though, If I come across it again I’ll pay more attention to what I did to cause it.
EDIT: Encountered it again in my new project. Just to add to the info above, it is Unity Pro.
What happened:
I was adding new models to the project. Had the two tiles-01 and the sand-01 models locked. Then I added Wall-01 and locked that, but it just doesn’t update the _lockedGameObjects Scene Objects anymore. (See image, in the Hierarchy the Sand-01, 2x Tiles-01 and Wall-03 are locked. But in the _lockedGameObjects the wall-03 is not added.)
If I unlock tiles-01, it also just keeps it in the Scene Objects list. The result of this is dat every time I press Play in the Unity Editor, and return, only the 3 items in the Scene Objects lists are locked again and the rest is unlocked.
SoftwareBug: Can you send me your scene, then I’ll boot my windows computer and work on it. I’m on mac and can’t reproduce. Send it to tim@kanako.dk or give me a link here.
Pix10: Colour coding/tagging is a great idea, but doesn’t seem that relevant to locking. Maybe something that someone (maybe even you?) could make
I will consider it.