Audio Source Set Ambisonic Decoder Float#
Audio / Audio Source / Audio Source Set Ambisonic Decoder Float
Description#
Compares the Set Ambisonic Decoder Float method of Audio Source component to another value
Parameters#
| Name | Description |
|---|---|
| Audio Source | |
| Index | |
| Value |
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 Ambisonic Decoder Float")]
[Category("Audio/Audio Source/Set Ambisonic Decoder Float")]
[Description("Compares the Set Ambisonic Decoder Float method of Audio Source component to another value")]
[Image(typeof(IconAudioSource), ColorTheme.Type.Yellow)]
[Keywords("Audio, Sound, Music, Ambient, Sfx")]
[Parameter("Audio Source")]
[Parameter("Index")]
[Parameter("Value")]
[Serializable]
public class GenConditionBool_AudioSource_CheckSetAmbisonicDecoderFloat_2 : Condition
{
[SerializeField] private GetGameObject m_AudioSource = new GetGameObject(
new GenTypeGameObject_AudioSource()
);
[SerializeField] private GetInteger m_Index = new GetInteger();
[SerializeField] private GetNumber m_Value = new GetNumber();
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Set Ambisonic Decoder Float");
string parameters = $"({this.m_Index}, {this.m_Value})";
return $"{this.m_AudioSource} {method}";
}
protected override bool Run(Args args)
{
AudioSource component = this.m_AudioSource.Get<AudioSource>(args);
if (component == null) return false;
bool value = component.SetAmbisonicDecoderFloat(
(int) this.m_Index.Get(args),
(float) this.m_Value.Get(args)
);
return value;
}
}
}