Play the specified sound at the given position.Returns a reference to the SoundyController that is playing the sound.Returns null if no sound is found.

using Doozy.Engine.Soundy;
using UnityEngine;
public class ExampleClass : MonoBehaviour
{
//The sound category
public string MySoundDatabaseName;
//Sound Name of the sound
public string MySoundName;
//The position from where this sound will play from
public Vector3 MyPosition;
private void Start()
{
SoundyManager.Play(MySoundDatabaseName, MySoundName, MyPosition);
}
}

Play the specified sound and follow a given target Transform while playing.Returns a reference to the SoundyController that is playing the sound.Returns null if no sound is found.

using Doozy.Engine.Soundy;
using UnityEngine;
public class ExampleClass : MonoBehaviour
{
//The sound category
public string MySoundDatabaseName;
//Sound Name of the sound
public string MySoundName;
//The target transform that the sound will follow while playing
public Transform MyFollowTarget;
private void Start()
{
SoundyManager.Play(MySoundDatabaseName, MySoundName, MyFollowTarget);
}
}

Play – SoundyData

Play a sound according to the settings in the SoundyData reference.Returns a reference to the SoundyController that is playing the sound if data.SoundSource is set to either Soundy or AudioClip.If data is null or data.SoundSource is set to MasterAudio, it will always return null because MasterAudio is the one playing the sound and not a SoundyController

Play the specified AudioClip with the given parameters, at the set position.Returns a reference to the SoundyController that is playing the sound.Returns null if the AudioClip is null.

using Doozy.Engine.Soundy;
using UnityEngine;
using UnityEngine.Audio;
public class ExampleClass : MonoBehaviour
{
//The AudioClip to play
public AudioClip MyAudioClip;
//The output audio mixer group that this sound will get routed through
public AudioMixerGroup MyOutputAudioMixerGroup;
//The position from where this sound will play from
public Vector3 MyPosition;
//The volume of the audio source (0.0 to 1.0)
public float MyVolume = 1;
//The pitch of the audio source
public float MyPitch = 1;
//Is the audio clip looping?
public bool MyLoop = false;
//Sets how much this AudioSource is affected by 3D space calculations (attenuation, doppler etc). 0.0 makes the sound full 2D, 1.0 makes it full 3D
public float MySpatialBlend = 1;
private void Start()
{
//Play with default settings
SoundyManager.Play(MyAudioClip, MyPosition);
//Play with default settings and a custom Output AudioMixerGroup
SoundyManager.Play(MyAudioClip, MyOutputAudioMixerGroup, MyPosition);
//Play with all the settings
SoundyManager.Play(MyAudioClip, MyOutputAudioMixerGroup, MyPosition, MyVolume, MyPitch, MyLoop, MySpatialBlend);
}
}