> For the complete documentation index, see [llms.txt](https://stellar-game-assets.gitbook.io/modular-character-system/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://stellar-game-assets.gitbook.io/modular-character-system/reference/scripting-guide/modular-character-manager-functions/materials/setwearablematerial.md).

# SetWearableMaterial

ModularCharacterManager.SetWearableMaterial

**Declaration**\
public void **SetWearableToNewMaterial**(**int** \_slotIndex, **int** \_arrayIndex, **Material** \_material);<br>

**Parameters**

<table><thead><tr><th width="217">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>int</strong> _slotIndex</td><td><em>The slot of the Wearable you want to add the new Material to.</em></td></tr><tr><td><strong>int</strong> _arrayIndex,</td><td><em>The index of the Material you want to swap</em></td></tr><tr><td><strong>Material</strong> _newMaterial</td><td><em>The new Material you want to apply.</em></td></tr></tbody></table>

**Description**\
The public function to replace the current material on a Wearable currently equipped to a particular slot with another material. Equips the referenced Material to the specified array on the mesh of the Wearable in the specified slot.

**Declaration**\
public void **SetWearableToNewMaterial**(int \_slotIndex, int \_arrayIndex, int \_materialIndex);<br>

**Parameters**

<table><thead><tr><th width="217">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>int</strong> _slotIndex</td><td><em>The slot of the Wearable you want to add the new Material to.</em></td></tr><tr><td><strong>int</strong> _arrayIndex,</td><td><em>The index of the Material you want to swap</em></td></tr><tr><td><strong>int</strong> _materialIndex,</td><td><em>The index of the Material in the Wearable's Available Material array, at the slot of the arrayIndex.</em></td></tr></tbody></table>

**Description**\
The public function to replace current material on a Wearable currently equipped to a particular slot  with another material using slot and index references
