ok so as the title says Im having issues getting files to work with my game (I have not got a clue on what im doing) I really need some help if anyone has any code or anything that can help it would be much appreciated
(and err is this the right place to be asking for help?)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.IO;
public class SoundManageSolo : MonoBehaviour
{
public AudioSource BGM;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
public void sound()
{
var dir = new DirectoryInfo(Application.dataPath + "/Sounds/Play1");
var info = dir.GetFiles("*.*");
var music = info[0];
BGM.Stop();
BGM.clip = music;
BGM.Play();
}
}