> For the complete documentation index, see [llms.txt](https://doc.realvirtual.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.realvirtual.io/components-and-scripts/changing-mus/muswitcher.md).

# MUSwitcher

Included since version 6.2.3 beta

The **MU Switcher** component allows dynamic switching of parts or variants of [Moving Units (MUs) ](/components-and-scripts/mu-movable-unit.md)based on sensor triggers. It is typically used in scenarios where different configurations or visual representations of an MU need to be activated during runtime (e.g., for visual changes, turning easy MUs into complex ones and so on).

<figure><img src="https://260262196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpYxFg97YnJX96UzNNTSd%2Fuploads%2Fgit-blob-eca17dd4b931890e134f12e12092ac81c7da8d13%2Fmuswitcher.gif?alt=media" alt=""><figcaption><p>Changing MUs with MUSwitcher (Demo2 in DemoChangeMU demonstration model)</p></figcaption></figure>

## Properties

**Switch To Group**: The name of the group (e.g., `MUVariant1`) that should be activated when an MU enters the sensor area.

<figure><img src="https://260262196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpYxFg97YnJX96UzNNTSd%2Fuploads%2Fgit-blob-df9abaafd1c4fa8885e31adff8a56afce26e39ab%2Fmuswitcher-inspector.png?alt=media" alt=""><figcaption><p>MUSwitcher attached to a Sensor</p></figcaption></figure>

When an MU enters the sensor associated with the `MUSwitcher`:

1. All subcomponents of the MU that are part of the specified group (matching the `Switch To Group`) are **enabled** (set active).
2. All other groups are **disabled** (set inactive).
3. Any GameObjects under the MU that do not belong to a group remain in their current active state

## Requirements

* The `MUSwitcher` must be attached to the same GameObject as a `Sensor` component.
* MU subcomponents must include a `Group` component that defines their `GroupName`.

<figure><img src="https://260262196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpYxFg97YnJX96UzNNTSd%2Fuploads%2Fgit-blob-22ae80dfb2539c48cfaaec14749ae31de11a05da%2Fmuswitcher-mu.png?alt=media" alt=""><figcaption><p>Example of a part with several Groups</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://doc.realvirtual.io/components-and-scripts/changing-mus/muswitcher.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
