> For the complete documentation index, see [llms.txt](https://docs.engagevr.io/developer/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.engagevr.io/developer/afx/node-dictionary/unity/component/rendering/material.md).

# Material

## Get Material

Get a reference to a material from a Renderer.

<figure><img src="https://2640392766-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5yxYHsXtlAaoMUrDWhLm%2Fuploads%2Fgit-blob-9eb4cb0d60f3183730ab521323aba6c5dad080b4%2Fafx_node_get_material.png?alt=media" alt=""><figcaption></figcaption></figure>

**Inputs:**

<table><thead><tr><th width="161">Name</th><th width="174">Type</th><th>Description</th></tr></thead><tbody><tr><td>Renderer In</td><td>Renderer</td><td>Reference to a Renderer.</td></tr><tr><td>Shared Material</td><td>Boolean [editable]</td><td>If True, outputs that shared material of the Renderer. If you modify a shared material, you will change the appearance of all objects that use that material.</td></tr><tr><td>Material Index</td><td>Integer [editable]</td><td>The index of the material to get a reference to.</td></tr></tbody></table>

**Outputs:**

<table><thead><tr><th width="162">Name</th><th width="178">Type</th><th>Description</th></tr></thead><tbody><tr><td>Material Out</td><td>Material</td><td>Reference to a material.</td></tr></tbody></table>

## Set Material

Sets the material of a Renderer.

<figure><img src="https://2640392766-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5yxYHsXtlAaoMUrDWhLm%2Fuploads%2Fgit-blob-3dcb54ea0b081936111ff156df3e3b439647be8a%2Fafx_node_set_material.png?alt=media" alt=""><figcaption></figcaption></figure>

**Inputs:**

<table><thead><tr><th width="161">Name</th><th width="174">Type</th><th>Description</th></tr></thead><tbody><tr><td>Enter</td><td>Flow</td><td>Flow to activate the node.</td></tr><tr><td>Renderer In</td><td>Renderer</td><td>Reference to a Renderer.</td></tr><tr><td>Material</td><td>Material [editable]</td><td>The material to apply to the Renderer.</td></tr><tr><td>Shared Material</td><td>Boolean [editable]</td><td>If true, the node updates the shared material.</td></tr><tr><td>Material Index</td><td>Integer [editable]</td><td>The index of the material to replace.</td></tr></tbody></table>

**Outputs:**

<table><thead><tr><th width="162">Name</th><th width="178">Type</th><th>Description</th></tr></thead><tbody><tr><td>Exit</td><td>Flow</td><td>Continue the activating flow.</td></tr></tbody></table>

## Set Material Color

Sets the color of a material. For more information, refer to [Material.SetColor](https://docs.unity3d.com/2021.3/Documentation/ScriptReference/Material.SetColor.html) in the Unity documentation.

<figure><img src="https://2640392766-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5yxYHsXtlAaoMUrDWhLm%2Fuploads%2Fgit-blob-a674465ebb190b07aa58f40a68e97d1dd320c3f6%2Fafx_node_set_mat_color.png?alt=media" alt=""><figcaption></figcaption></figure>

**Inputs:**

<table><thead><tr><th width="161">Name</th><th width="174">Type</th><th>Description</th></tr></thead><tbody><tr><td>Enter</td><td>Flow</td><td>Flow to activate the node.</td></tr><tr><td>Material In</td><td>Material</td><td>The material to set the color of.</td></tr><tr><td>Color Property</td><td>String [editable]</td><td>The name of the color to change. In the pre-built shaders, <code>_Color</code> is the name of the main color of the material.</td></tr><tr><td>Color In</td><td>Color [editable]</td><td>The color to set.</td></tr></tbody></table>

**Outputs:**

<table><thead><tr><th width="162">Name</th><th width="178">Type</th><th>Description</th></tr></thead><tbody><tr><td>Exit</td><td>Flow</td><td>Continue the activating flow.</td></tr></tbody></table>

## Set Material Float

Sets a named float value. For more information, refer to the [Material.SetFloat](https://docs.unity3d.com/2021.3/Documentation/ScriptReference/Material.SetFloat.html) page in the Unity documentation.

<figure><img src="https://2640392766-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5yxYHsXtlAaoMUrDWhLm%2Fuploads%2Fgit-blob-68749c7be64999dd14945fb2c5c373f4c0d45b7d%2Fafx_node_set_mat_float.png?alt=media" alt=""><figcaption></figcaption></figure>

**Inputs:**

<table><thead><tr><th width="161">Name</th><th width="174">Type</th><th>Description</th></tr></thead><tbody><tr><td>Enter</td><td>Flow</td><td>Flow to activate the node.</td></tr><tr><td>Material In</td><td>Material</td><td>Reference to the material to modify.</td></tr><tr><td>Float Property</td><td>String</td><td>The name of the float property to change.</td></tr><tr><td>Float In</td><td>Float</td><td>The float value to set for the property.</td></tr></tbody></table>

**Outputs:**

<table><thead><tr><th width="162">Name</th><th width="178">Type</th><th>Description</th></tr></thead><tbody><tr><td>Exit</td><td>Flow</td><td>Continue the activating flow.</td></tr></tbody></table>

## Set Material Int

Sets a named integer value. For more information, refer to the [Material.SetInteger](https://docs.unity3d.com/2021.3/Documentation/ScriptReference/Material.SetInteger.html) page in the Unity documentation.

<figure><img src="https://2640392766-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5yxYHsXtlAaoMUrDWhLm%2Fuploads%2Fgit-blob-e0edf986eecc94728b8a74383df4f97a50545a8a%2Fafx_node_set_mat_int.png?alt=media" alt=""><figcaption></figcaption></figure>

**Inputs:**

<table><thead><tr><th width="161">Name</th><th width="174">Type</th><th>Description</th></tr></thead><tbody><tr><td>Enter</td><td>Flow</td><td>Flow to activate the node.</td></tr><tr><td>Material In</td><td>Material</td><td>Reference to the material to modify.</td></tr><tr><td>In Property Name</td><td>String [editable]</td><td>The name of the integer property to change.</td></tr><tr><td>Int In</td><td>Integer [editable]</td><td>The integer value to set for the property.</td></tr></tbody></table>

**Outputs:**

<table><thead><tr><th width="162">Name</th><th width="178">Type</th><th>Description</th></tr></thead><tbody><tr><td>Exit</td><td>Flow</td><td>Continue the activating flow.</td></tr></tbody></table>

## Set Material Texture

Sets a named texture. For more information, refer to the [Material.SetTexture](https://docs.unity3d.com/2021.3/Documentation/ScriptReference/Material.SetTexture.html) page in the Unity documentation.

<figure><img src="https://2640392766-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5yxYHsXtlAaoMUrDWhLm%2Fuploads%2Fgit-blob-429d512ba4309e3cf38937ec753e86d6025c5a8c%2Fafx_node_set_mat_texture.png?alt=media" alt=""><figcaption></figcaption></figure>

**Inputs:**

<table><thead><tr><th width="161">Name</th><th width="174">Type</th><th>Description</th></tr></thead><tbody><tr><td>Enter</td><td>Flow</td><td>Flow to activate the node.</td></tr><tr><td>Material In</td><td>Material</td><td>Reference to the material to modify.</td></tr><tr><td>Texture Property</td><td>String [editable]</td><td>The name of the texture to replace. In the pre-built shaders, <code>_MainTex</code> is the name of the main diffuse texture of the material.</td></tr><tr><td>Texture In</td><td>Texture</td><td>The texture to apply to the material.</td></tr></tbody></table>

**Outputs:**

<table><thead><tr><th width="162">Name</th><th width="178">Type</th><th>Description</th></tr></thead><tbody><tr><td>Exit</td><td>Flow</td><td>Continue the activating flow.</td></tr></tbody></table>

## Set Material Vector

Sets a named vector value. For more information, refer to the [Material.SetVector](https://docs.unity3d.com/2021.3/Documentation/ScriptReference/Material.SetVector.html) page in the Unity documentation.

<figure><img src="https://2640392766-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5yxYHsXtlAaoMUrDWhLm%2Fuploads%2Fgit-blob-61effdaf3c8dedf2cfe29d7f7c9ce54e5b8d7855%2Fafx_node_set_mat_vector.png?alt=media" alt=""><figcaption></figcaption></figure>

**Inputs:**

<table><thead><tr><th width="161">Name</th><th width="174">Type</th><th>Description</th></tr></thead><tbody><tr><td>Enter</td><td>Flow</td><td>Flow to activate the node.</td></tr><tr><td>Material In</td><td>Material</td><td>Reference to the material to modify.</td></tr><tr><td>Vector Property</td><td>String [editable]</td><td>The name of the vector to set.</td></tr><tr><td>Vector In</td><td>Vector4 [editable]</td><td>The four component vector to apply to set for the property.</td></tr></tbody></table>

**Outputs:**

<table><thead><tr><th width="162">Name</th><th width="178">Type</th><th>Description</th></tr></thead><tbody><tr><td>Exit</td><td>Flow</td><td>Continue the activating flow.</td></tr></tbody></table>
