12
2019
Using SharpCompress in Unity
If you need to work with zip/rar/tar/gzip packages, can use SharpCompress to handle opening or creating those files.
Compile SharpCompress DLL (unless you can find it online somewhere)
- Download project https://github.com/adamhathcock/sharpcompress
- Unzip and open in VisualStudio (i used 2017)
- Security warning, press ok
- Security warning, press ok
- View / Solution Explorer .. (if not already visible)
- Right click over SharpCompress, select Build
- Now you should have the dll in ..\sharpcompress-master\sharpcompress-master\src\SharpCompress\bin\Debug\ folder (3.5 and 4.5 versions, pick which one you like, recent unity versions support 4.5 by default, so lets pick “net45\SharpCompress.dll”)
- Copy it to your unity project, under Assets\Plugins\SharpCompress\ SharpCompress.dll
- If you are using Unity 2017.x or lower, go to Player Settings / Other settings, and enable 4.6 from “Scripting Runtime Version”
- Test creating zip package with the script below (adjust source and output folders in the script)
Source:
https://gist.github.com/unitycoder/edfc22570e93db61f83d582c98c4dff5
TroubleShooting
Error in Android build:
“NotSupportedException: ..il2cpp\libil2cpp\icalls\mscorlib\System.Reflection.Emit\DynamicMethod.cpp(19) : Unsupported internal call for IL2CPP:DynamicMethod::create_dynamic_method – System.Reflection.Emit is not supported.
05-12 01:52:09.319 2523 2549 E Unity : at System.Reflection.Emit.DynamicMethod.CreateDynMethod ()”
Solution:
Use Mono as Scripting Backend (IL2CPP gives that error)

Related Posts
Leave a comment
Recent posts
- Editor Tool: Scene Size Analyzer
- LudumDare 60: Old Tech
- uBasic Scripting Language for Unity
- GreaseMonkey+Editor Plugin: 1-Click Copy script from ChatGPT (Web) to Unity Editor (as script)
- Editor Tool: Property Watcher
- .unityignore : Hide files from Project window
- PostBuild Script to Create Single exe Standalone File
- Game Loop Designer
- Favorites in PackageManager
- LudumDare59 : Signal
- Unity Editor: Tree Generator
- Leaf/Foliage Generator Tools (Runs in Browser)
Recent Comments
Coin:
CUgDSbRqFcAumDSAcdKDvuXsw26VdkJe8C8WGUQHBAGS
An article by











