# Lock/Hide Objects

Use this rule to hide or lock one or more GameObjects in the scene. You can filter by name, tag, or component.

<figure><img src="https://3932909560-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJbMi1RQ5OkWEfZdkCUEX%2Fuploads%2F7Cb1ZyPUp2XWzDg1SP7H%2FLockObjects.png?alt=media&#x26;token=7ad9a684-ff74-4a29-b528-6561e674456a" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="info" %}
**No scene changes**

Note that hiding is done via [Scene Visibility](https://docs.unity3d.com/Manual/SceneVisibility.html), and locking via [Scene Picking](https://docs.unity3d.com/Manual/ScenePicking.html), and not via the GameObject's active flag. As such, enabling this rule doesn't modify the scene.
{% endhint %}

### On workspace enabled

All the GameObjects in the open scenes found as part of the search are locked and/or hidden.

### On workspace disabled

All the GameObjects found in the search are set to visible and pickable again.

{% hint style="warning" %}
**Inactive objects**

If looking for object by tag, ensure that the objects you want to be affected are active, as [GameObject.FindGameObjectsWithTag](https://docs.unity3d.com/ScriptReference/GameObject.FindGameObjectsWithTag.html) is not capable of finding inactive ones. If you want to lock or hide inactive objects, you might want to consider looking for objects by name or by component.
{% endhint %}
