Audio Source Set Gamepad Speaker Mix Level#
Audio / Audio Source / Audio Source Set Gamepad Speaker Mix Level
Description#
Compares the Set Gamepad Speaker Mix Level method of Audio Source component to another value
Parameters#
| Name | Description |
|---|---|
| Audio Source | |
| Slot | |
| Mix Level |
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 Gamepad Speaker Mix Level")]
[Category("Audio/Audio Source/Set Gamepad Speaker Mix Level")]
[Description("Compares the Set Gamepad Speaker Mix Level method of Audio Source component to another value")]
[Image(typeof(IconAudioSource), ColorTheme.Type.Yellow)]
[Keywords("Audio, Sound, Music, Ambient, Sfx")]
[Parameter("Audio Source")]
[Parameter("Slot")]
[Parameter("Mix Level")]
[Serializable]
public class GenConditionBool_AudioSource_CheckSetGamepadSpeakerMixLevel_2 : Condition
{
[SerializeField] private GetGameObject m_AudioSource = new GetGameObject(
new GenTypeGameObject_AudioSource()
);
[SerializeField] private GetInteger m_Slot = new GetInteger();
[SerializeField] private GetInteger m_MixLevel = new GetInteger();
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Set Gamepad Speaker Mix Level");
string parameters = $"({this.m_Slot}, {this.m_MixLevel})";
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.SetGamepadSpeakerMixLevel(
(int) this.m_Slot.Get(args),
(int) this.m_MixLevel.Get(args)
);
return value;
}
}
}