My scriptable object:
[CreateAssetMenu(fileName = "AudioCollection", menuName = "AudioCollection")]
public class AudioClipCollection : ScriptableObject {
[System.Serializable]
public class Clip{
public string name;
public AudioClip audioClip;
}
public List<Clip> clips = new List<Clip>();
}
The list declaration line gives the error:
AudioClipCollection must be instantiated using the ScriptableObject.CreateInstance method
instead of new AudioClipCollection.
How am I meant to be declaring lists within a scriptable object? I have used ‘ScriptableObject.CreateInstance’ to create the scriptable object, so that is not the issue.
Cheers!