I am getting this weird error in unity when I am trying to run my (sad excuse for a) game. Here's the code
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ARsound : MonoBehaviour
{
public static AudioClip sound;
static AudioSource audioSrc;
void Start()
{
sound = Resources.Load<AudioClip>("AR SFX");
audioSrc = GetComponent<AudioSource>();
}
public static void playSound()
{
audioSrc.PlayOneShot(sound);
}
}
And the error is this:
PlayOneShot was played with a null audio clip
Even though that audio clip doesn't SEEM to be null. Here is some additional info:
Gun:Update() (at Assets/Scripts/Gun.cs:17)
Suggestions?