Reputation: 331
I'm currently using Unity3D, and using C# as my main script language. My application downloads some assets from a server, and I need to make sure there is enough space available for this. My assets are going in the path that is given by Application.persistentDataPath.
I need to check this for a Mac Standalone build !
Would anyone know how to check this, preferably in Unity C#, but I can work with native code and such if I have to !
UPDATE :
Upon seeing the answer from @Marius George, I'm just wondering about a little detail : That methods gives me information on all drives. What I need is information for my app only, and not necessarily all the drives (my application might not have access to all of the disk space). Any ideas how to get the one drive I actually need?
Upvotes: 0
Views: 1265
Reputation: 526
I think the System.IO.DriveInfo class works on some platforms:
http://forum.unity3d.com/threads/disk-space-available.119725/
See if this works on Mac.
Upvotes: 1