Audio Source Set Scheduled Start Time#
Audio / Audio Source / Audio Source Set Scheduled Start Time
Description#
Executes the Set Scheduled Start Time method on the Audio Source component
Parameters#
| Name | Description |
|---|---|
| Time |
Code#
// <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 Set Scheduled Start Time")]
[Category("Audio/Audio Source/Set Scheduled Start Time")]
[Description("Executes the Set Scheduled Start Time method on the Audio Source component")]
[Image(typeof(IconAudioSource), ColorTheme.Type.Yellow)]
[Keywords("Audio, Sound, Music, Ambient, Sfx")]
[Parameter("Time")]
[Serializable]
public class GenInstructionAudioSource_SetScheduledStartTime_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("Set Scheduled Start Time");
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.SetScheduledStartTime(
(double) this.m_Time.Get(args)
);
return Done;
}
}
}