Skip to content

Commit 3a54233

Browse files
committed
Fixed Unity editor implementation in SimpleDiskUtils
1 parent bbf25b5 commit 3a54233

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

Assets/SimpleDiskUtils/Plugins/DiskUtils/DiskUtils.cs

+6-4
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
using System.Runtime.Serialization.Formatters.Binary;
3737
using System.Text;
3838
using UnityEngine;
39+
using static System.IO.DriveInfo;
3940

4041
namespace SimpleDiskUtils
4142
{
@@ -140,8 +141,9 @@ public static string[] GetDriveNames()
140141
/// Checks the available space.
141142
/// </summary>
142143
/// <returns>The available space in MB.</returns>
143-
public static int CheckAvailableSpace(){
144-
DriveInfo drive = GetDrive (DEFAULT_DRIVE);
144+
public static int CheckAvailableSpace()
145+
{
146+
DriveInfo drive = new DriveInfo(DEFAULT_DRIVE);
145147
if (drive == null)
146148
return -1;
147149
return int.Parse((drive.AvailableFreeSpace / MEGA_BYTE).ToString());
@@ -152,7 +154,7 @@ public static int CheckAvailableSpace(){
152154
/// </summary>
153155
/// <returns>The total space in MB.</returns>
154156
public static int CheckTotalSpace(){
155-
DriveInfo drive = GetDrive (DEFAULT_DRIVE);
157+
DriveInfo drive = new DriveInfo(DEFAULT_DRIVE);
156158
if (drive == null)
157159
return -1;
158160
return int.Parse ((drive.TotalSize / MEGA_BYTE).ToString());
@@ -163,7 +165,7 @@ public static int CheckTotalSpace(){
163165
/// </summary>
164166
/// <returns>The busy space in MB.</returns>
165167
public static int CheckBusySpace(){
166-
DriveInfo drive = GetDrive (DEFAULT_DRIVE);
168+
DriveInfo drive = new DriveInfo(DEFAULT_DRIVE);
167169
if (drive == null)
168170
return -1;
169171

Packages/manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"com.unity.ads": "4.2.1",
66
"com.unity.analytics": "3.8.1",
77
"com.unity.collab-proxy": "1.17.2",
8-
"com.unity.ide.rider": "3.0.15",
8+
"com.unity.ide.rider": "3.0.24",
99
"com.unity.ide.visualstudio": "2.0.16",
1010
"com.unity.ide.vscode": "1.2.5",
1111
"com.unity.mobile.android-logcat": "1.3.2",

Packages/packages-lock.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"url": "https://packages.unity.com"
4949
},
5050
"com.unity.ide.rider": {
51-
"version": "3.0.15",
51+
"version": "3.0.24",
5252
"depth": 0,
5353
"source": "registry",
5454
"dependencies": {

0 commit comments

Comments
 (0)