Closed jakeHaasBlog closed 10 months ago
Fixed the problem. The sound was playing in 3D, so when the player was repositioned, they were too far away to hear the sound. Fixed it by playing the audio in 2D using this code:
AudioSource audio = ((GameObject) Instantiate(gameObject, transform.position, Quaternion.identity)).GetComponent<AudioSource>();
audio.clip = soundEffect;
audio.Play();
Portal sound effect is cutting off half way through playing