# 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="/files/c5nhcEpmsnWx7XsgTSN6" 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://tools.continis.io/hats/workspaces/workspace-rules/lock-hide-objects.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
