> 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

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="/files/ITL7hBStv7Q6LVNZGdqc" 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="/files/HwyuDuAmKNkixdo957w0" 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="/files/zcyIfyOaU6oU3TWaCKEA" 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 dynamically by asking a question.

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

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
