# Active Meshes

## Overview

This component toggle gameobjects on and off on a list. Useful to switch props on a character.

![](/files/-MZFuJ57uf5ZvtyQs75n)

{% hint style="info" %}
When you click the Change Mesh Button it will cycle between all the **Meshes** on the Active Mesh. **This only work on the Editor.** For Game purposes use **Public methods.**
{% endhint %}

![](/files/-MZFvKEkxYw5xh8DqEUd)

It uses a List of **\<Active Meshes>** to switch through them &#x20;

You can create any new **Active Mesh** by clicking on the Plus(**+**) button of the list.

![](/files/-MZFwiqMNJm-TV6k4YGY)

## Parameters

### Show/Hide Properties <img src="/files/-MZFx6JprW32mB1sfDAO" alt="" data-size="original">&#x20;

Shows/Hide the selected **Active Mesh** properties.

![](/files/-MZFxaeqbDJWh6u6zzrY)

When you select an **Active Mesh** on the list you will have the (Index), the Name, and Button with the Current Active mesh

### Random \[R]

It will set a random Mesh on Start on every **Active Mesh**. Useful to create random variations.

## Active Mesh

The Active Mesh is a struct class that holds all the Parameters and properties needed to hide/toggle the transforms inside a character.

![](/files/-MZFz14Z50kVVNiPnQF4)

{% hint style="info" %}
Set an empty gameobject on the list in case you want to have no transforms shown.
{% endhint %}

## Methods and Properties

### `void Randomize()`

> Randomize all the Active Meshes on the list

### `void SetActiveMeshesIndex(int[] MeshesIndex)`

> Set All the  ActiveMeshes Indexes from the Meshes list.&#x20;

### `void ChangeMesh(int index)`

> Select an element from the list by the index, and change to the next variation.&#x20;

### `void ChangeMesh(int index, int MeshIndex)`

> Select an element from the list by the index, and change to a variation using the variation Index.&#x20;

### `void ChangeMesh(string name, bool next)`

> Randomize all the&#x20;
>
> > Select an element from the list by the name, and change next or before Mesh (.

### `andomize()`

> Randomize all the Active Meshes on th


---

# 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://malbersanimations.gitbook.io/animal-controller/utilities/active-meshes.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.
