dkrprasetya / simple-disk-utils

Unity plugin for disk/storage capacity check helper methods
104 stars 35 forks source link

The name 'GetDrive' does not exist in the current context #7

Closed nyc1215 closed 2 years ago

nyc1215 commented 2 years ago

Hi,I am using Jenkins to build my unity project for Android platform on Ubuntu18.04.
When Unity try to compile your plugin's code on the SimpleDiskUtils/Plugins/DiskUtils/DiskUtils.cs,
Unity will throw Scripts have compiler errors error.

Log shows that:

Assets/ThirdParty/SimpleDiskUtils/Plugins/DiskUtils/DiskUtils.cs(144,25): error CS0103: The name 'GetDrive' does not exist in the current context
Assets/ThirdParty/SimpleDiskUtils/Plugins/DiskUtils/DiskUtils.cs(155,25): error CS0103: The name 'GetDrive' does not exist in the current context
Assets/ThirdParty/SimpleDiskUtils/Plugins/DiskUtils/DiskUtils.cs(166,25): error CS0103: The name 'GetDrive' does not exist in the current context

In DiskUtils.cs, line 87, I try to fix this bug with this:
before:

#elif UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN

after

#elif UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN || UNITY_EDITOR_LINUX

With this modification, Unity will not show complier error in DiskUtils.cs, but I don't now whether my modification will bring other bugs for other platform.