Example #1
0
        private static void Decompress()
        {
#if IO_UNSUPPORTED_PLATFORM
            Debug.LogWarning("[Zip] Not supported.");
#else
            string   _zippedFilePath = AssetDatabaseUtils.GUIDToAssetAbsolutePath(Selection.assetGUIDs[0]);
            FileInfo _fileInfo       = new FileInfo(_zippedFilePath);

            DecompressToDirectory(_zippedFilePath, _fileInfo.Directory.FullName, (string _outputMessage) => {
                Console.WriteLine(_outputMessage);
            });
#endif
        }
Example #2
0
        private static bool DecompressValidation()
        {
            string[] _guids = Selection.assetGUIDs;

            if (_guids.Length <= 0)
            {
                return(false);
            }

            string _selectedFilePath = AssetDatabaseUtils.GUIDToAssetAbsolutePath(_guids[0]);
            string _fileExtension    = Path.GetExtension(_selectedFilePath);

            if (_fileExtension == null)
            {
                return(false);
            }

            return(_fileExtension.Equals(".gz"));
        }