I’ve got a scriptable object with an audiosource variable on it. This audio would then be played through another script. However, when I create an instance of this scriptable object, I can’t attach any audiosource component to it. The empty variable shows up in the inspector, but even the eye dropper tool shows up with no audio source components to select.
I’ve also got a texture2D variable as a test, and I can assign things to that in the inspector just fine, so what’s the deal with not being able to assign an audio source?
using UnityEngine;
[CreateAssetMenu(fileName = "New Walkman", menuName = "Items/Walkman")]
public class Walkman : ScriptableObject
{
[SerializeField] AudioSource audio = null;
public AudioSource Audio { get { return audio; } }
[SerializeField] Texture2D texture = null;
public Texture2D Texture { get { return texture; } }
}