Beispiel #1
0
        public SoundObject SpawnSoundObject(Transform transform, AudioClip audioClipToPlay, bool destroyWhenFinished = true, bool isLoop = false)
        {
            SoundObject soundObject = SpawnSoundObject(audioClipToPlay);

            if (soundObject)
            {
                soundObject.PlaySound(transform, audioClipToPlay, destroyWhenFinished, isLoop);
            }
            return(soundObject);
        }
Beispiel #2
0
        public SoundObject SpawnSoundObject(Vector3 position, AudioClip audioClipToPlay, bool destroyWhenFinished = true, bool isLoop = false)
        {
            SoundObject soundObject = SpawnSoundObject(audioClipToPlay);

            if (soundObject)
            {
                soundObject.PlaySound(position, audioClipToPlay, destroyWhenFinished, isLoop);
            }
            return(soundObject);
        }