Here's my code, it's so basic and I know the solution will be too, but I checked in reference and still didn't fix it, any suggestion will be appreciated, thanks!
using System.Collections;
using UnityEngine.Audio;
using System.Collections.Generic;
using UnityEngine;
public class Passed : MonoBehaviour {
AudioSource audioData;
void Start()
{
}
void OnColliderEnter2D()
{
audioData = GetComponent<AudioSource>();
audioData.Play(0);
}
}
Rigidbody2D
on at least one object? – derHugo