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