---
tags:
    - "Audio, Sound, Music, Ambient, Sfx"
---

# Set Audio Source Mute

[Audio](../index.md) / [Audio Source](index.md) / **Set Audio Source Mute**

## Description

Sets the Mute property of Audio Source component

## Parameters

| Name | Description |
| :--- | :---------- |
| Audio Source |  |
| Value |  |

## Code

```cs
// <auto-generated>
// This script was automatically generated using the Visual Script Transpiler.
// Do not modify. Changes to this file will be lost when updating the package.
// </auto-generated>

using System;
using UnityEngine;
using VisualScript.Icons;
using UnityEngine.Audio;

namespace VisualScript.Runtime
{
    [Title("Set Audio Source Mute")]
    [Category("Audio/Audio Source/Mute")]
    [Description("Sets the Mute property of Audio Source component")]
    
    [Image(typeof(IconAudioSource), ColorTheme.Type.Yellow)]
    [Keywords("Audio, Sound, Music, Ambient, Sfx")]
    
    [Parameter("Audio Source")]
    [Parameter("Value")]
    
    [Serializable]
    public class GenInstructionBool_AudioSource_SetMute : Instruction
    {
        [SerializeField] private GetGameObject m_AudioSource = new GetGameObject(
            new GenTypeGameObject_AudioSource()
        );
        
        [SerializeField] private GetBool m_Value = new GetBool();
        
        protected override string GetTitle(GameObject source)
        {
            string member = TextUtils.ThemeAsKeyword("Mute");
            return $"{this.m_AudioSource} {member} = {this.m_Value}";
        }
        
        protected override Awaitable Run(Args args)
        {
            AudioSource component = this.m_AudioSource.Get<AudioSource>(args);
            if (component == null) return Done;
            
            component.mute = (bool) this.m_Value.Get(args);
            
            return Done;
        }
    }
}


```

