https://github.com/unity-package/disk-space-checker-unity
Check disk space for unity (Android & iOS)
https://github.com/unity-package/disk-space-checker-unity
Last synced: 10 months ago
JSON representation
Check disk space for unity (Android & iOS)
- Host: GitHub
- URL: https://github.com/unity-package/disk-space-checker-unity
- Owner: unity-package
- Created: 2025-06-18T03:49:01.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-06-18T04:34:03.000Z (10 months ago)
- Last Synced: 2025-06-18T05:32:05.348Z (10 months ago)
- Language: C#
- Size: 6.84 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## How To Install
### Add the line below to `Packages/manifest.json`
for version `1.0.0`
```json
"com.unity-package.disk-space-checker":"https://github.com/unity-package/disk-space-checker-unity.git#1.0.0",
```
## Use
- Example usage script:
```csharp
public void CheckDisk() {
long freeSpace = DiskSpaceCheck.GetAvailableDiskSize();
float freeSpaceMB = DiskSpaceCheck.GetAvailableDiskSizeInMB();
float freeSpaceGB = DiskSpaceCheck.GetAvailableDiskSizeInGB();
Debug.Log($"free space available on disk: {freeSpace} / {freeSpaceMB} MB / {freeSpaceGB}.");
}
```
## Test results
- Check logcat:

- Check disk by PC:

- Check disk by device:

- Note:
```
Maybe the way each OS calculates memory is different so there is a small difference.
```