Read from sdcard

hi look for read sound from sdcard it’s possible from unity ? plz

If you have enabled External Write Access in your Player Settings you can get sdcard path with: Application.persistentDataPath

If not, you need to figure out the external path manually, ex: /mnt/sdcard should work for most Android devices, but other alternate ways are /sdcard, or /storage/sdcard0. Anyway, note that you don’t should rely with hardcoded paths and you need to use getExternalFilesDir(null) as native Android function to get the correct sdcard path.

Once you have the external sdcard path, you can proceed to load the sound file simply using the WWW class with file protocol.

WWW www = new WWW("file://" + path);
AudioClip audioClip = www.audioClip;

nice and if don’t know file i try reading like random sound in sdcard