Cannot import Unity Serializer(save&load)

Hello,

I want to add a save/load function in my Augmented reality project (Vuforia).I have found a nice Unity Serializer packageV2.51. (http://whydoidoit.com/unityserializer/).

After i imported the package in my Vuforia project, there are error message shown in my unity editor.

Assets/Plugins/Editor/Unzip.js(12,25): BCE0004: Ambiguous reference ‘ZipEntry’: ICSharpCode.SharpZipLib.Zip.ZipEntry, ICSharpCode.SharpZipLib.Zip.ZipEntry.

However, if i create a empty project with Unity Serializer packageV2.51 only, no error message in the editor.

Is it crash in Vuforia and Unity Serializer?

Thank you.

2 Answers

2

You have managed to get two copies of ICSharpCode.SharpZipLib in the project. Work out which one is newer and delete the older one.

If you search your project of ZipEntry you should be able to identify the two locations.

Hello, you mean i need to delete one of the two ZipEntry.cs file in my project? However, i found a ZipEntry.cs only.

–

Also, only one (namespace ICSharpCode.SharpZipLib.Zip) in ZipEntry

–

Hmmm, odd. Well the error message says you have two! I wrote Unity Serializer and I use Vuforia in my project - I normalised out so I only have one copy of the SharpZipLib.dll - perhaps you have two of those?

–

[22788-未命名.png|22788] Hello, i have found number of "ICSharpCode.SharpZipLib" in my UNITY folder, not in project file. Which one should i delete? However, i dont know which one is newer and older, all of them in a same modify date. Thank you

–

That's all pretty darn odd - there is a SharpZipLib included with Unity Serializer!

–

I had this same problem and I’m sure it’s because Vuforia includes this library in it’s dll. I’m on a Mac, so not sure how to ‘normalize’ the project as whydoidoit suggested and could not find a duplicate entry in any of the scripts by searching.

What did work was to Refactor/Rename ZipEntry to mZipEntry to provide a unique name for the class. Hope this helps someone else!