Question by
a17aardezzap · May 14, 2020 at 01:01 AM ·
audioaudiosourceaudio.play
Audio doesn't sound
Hey guys, I've tried to apply one audio to a power up, but the thing is that the audio doesn't play. I looked at everything, my headphones, the audio source and the audio itself.
Here is my code: using System.Collections; using System.Collections.Generic; using UnityEngine; using System;
public class PU_Armor : MonoBehaviour
{
AudioSource ArmorEnter;
void Start ()
{
ArmorEnter = GetComponent<AudioSource>();
}
void OnCollisionEnter2D (Collision2D other)
{
if (other.gameObject.tag == "Prota")
{
ArmorEnter.Play();
Destroy(gameObject);
}
}
}
Comment
Your answer
Follow this Question
Related Questions
Audio Fade In / Fade Out with Trigger 0 Answers
audio is not playing during IEnumerator 1 Answer
Audio not playing in game 1 Answer
How to reduce delay when playing sound 0 Answers
Pick Up Sound 0 Answers