Well my question as it says refer to particle Systems and sounds, i am not 100% secure that it is related to the fact that is the particle system, basicly i have fire on my game, and when my ball colides with the fire it should play the sound, the thing is that it can't find the AudioSource and keep saying that is no AUdioSource attached, but i already did it using 2 diferent ways, attaching the audioSource through inspector, and setting it to private and get the component of the audioSOurce in the gameObject, so what am i doing wrong? :S
Here is the code:
using UnityEngine;
using System.Collections;
public class particlCol : MonoBehaviour {
Manager gameManager;
public AudioClip aud;
private AudioSource audioC;
void Start()
{
audioC = GetComponent<AudioSource> ();
gameManager = GameObject.Find ("GameController").GetComponent<Manager> ();
}
void OnParticleCollision(GameObject other)
{
if (other.tag == "Player") {
Debug.Log ("entrou");
audioC.clip = aud;
audioC.Play ();
gameManager.LifeDown ();
}
}
}
Screenshot of the object:
Ps: it worked perfectly before, when it touched the fire i lost a life in my game so the problem is not with the colision itself
