Is there a way to put selected files to a zipp folder from Unity app?

Viewed 31

I would like to save my scene data (like save data and images) to a zipp folder from inside the app so they can be shared easily, but I am not sure how to do it correctly.

I know about c# GZipStream class but I am not sure if it work in my case I want users to be able to share these files so the best way would be to just zipp them like how normal zip works where he can unzip them in the correct folder and they would work.

1 Answers

I ended using SharpZipLib ZipUtility package for Unity. It was straight forward and I just added the .zip on the file path end. The package is a preview so you cant find it in package manager window anymore I added it by this git URL: com.unity.sharp-zip-lib witch I somehow found on package documentation (documentation for unity packages isn't always the best in my opinion so it wasn't that easy to find). Here is the documentation link: https://docs.unity3d.com/Packages/com.unity.sharp-zip-lib@1.2/api/Unity.SharpZipLib.Utils.ZipUtility.html

Related