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

# Audio Source Play Scheduled

[Audio](../index.md) / [Audio Source](index.md) / **Audio Source Play Scheduled**

## Description

Executes the Play Scheduled method on the Audio Source component

## Parameters

| Name | Description |
| :--- | :---------- |
| Time |  |

## 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("Audio Source Play Scheduled")]
    [Category("Audio/Audio Source/Play Scheduled")]
    [Description("Executes the Play Scheduled method on the Audio Source component")]
    
    [Image(typeof(IconAudioSource), ColorTheme.Type.Yellow)]
    [Keywords("Audio, Sound, Music, Ambient, Sfx")]
    
    [Parameter("Time")]
    
    [Serializable]
    public class GenInstructionAudioSource_PlayScheduled_1 : Instruction
    {
        [SerializeField] private GetGameObject m_AudioSource = new GetGameObject(
            new GenTypeGameObject_AudioSource()
        );
        
        [SerializeField] private GetNumber m_Time = new GetNumber();
        
        protected override string GetTitle(GameObject source)
        {
            string method = TextUtils.ThemeAsKeyword("Play Scheduled");
            return $"{this.m_AudioSource} {method} ({this.m_Time})";
        }
        
        protected override Awaitable Run(Args args)
        {
            AudioSource component = this.m_AudioSource.Get<AudioSource>(args);
            if (component == null) return Done;
            
            component.PlayScheduled(
                (double) this.m_Time.Get(args)
            );
            
            return Done;
        }
    }
}


```

