How can I detect drive letters and types in unity?


I want to detect drive letters and types in unity.I tried DriveInfo.GetDrives() , But it says "The requested feature is not implemented" . Is there any other way to do this in unity?

Thanks in advance.

Try Directory.GetLogicalDrives()

The following code worked for me in Unity:

string[] drives = Directory.GetLogicalDrives();
foreach (string drive in drives)

I can find no way to get the list of all available drives directly in a script with Unity 3.1.

Either Mono has not implemented DriveInfo's functionality or Unity has explicitly overridden it to provide that error message. Whatever the reason, users are prevented from being able to do this as you have found.

The only workaround that I can think of at present is to wrap that functionality into a plug-in (Pro/mobile only) and then call the function from there.