Audio Source Set Spatializer Float#
Audio / Audio Source / Audio Source Set Spatializer Float
Can Read
Cannot Write
Description#
Returns the execution of Set Spatializer Float method on the Audio Source component
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
{
[Get]
[Title("Audio Source Set Spatializer Float")]
[Category("Audio/Audio Source/Set Spatializer Float")]
[Description("Returns the execution of Set Spatializer Float method on the Audio Source component")]
[Image(typeof(IconAudioSource), ColorTheme.Type.Yellow)]
[Keywords("Audio, Sound, Music, Ambient, Sfx")]
[Serializable]
public class GenTypeBool_AudioSource_SetSpatializerFloat_2 : TypeBool
{
[SerializeField] private GetGameObject m_AudioSource = new GetGameObject(
new GenTypeGameObject_AudioSource()
);
[SerializeField] private GetInteger m_Index = new GetInteger();
[SerializeField] private GetNumber m_Value = new GetNumber();
public override bool Get(Args args)
{
AudioSource component = this.m_AudioSource.Get<AudioSource>(args);
if (component == null) return default;
bool value = (bool) component.SetSpatializerFloat(
(int) this.m_Index.Get(args),
(float) this.m_Value.Get(args)
);
return value;
}
public override string ToString()
{
return $"{this.m_AudioSource} Set Spatializer Float ({this.m_Index}, {this.m_Value})";
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
}
}