How do I resolve "Exception: Key count is different to value count"?

Discussion and help for Easy Save 3
Post Reply
TheClaw
Posts: 3
Joined: Fri Jun 09, 2023 6:20 am

How do I resolve "Exception: Key count is different to value count"?

Post by TheClaw »

Hi, After resolving a recent git conflict, I've started getting an exception in unity that says: Exception: Key count is different to value count after deserialising dictionary. ES3Internal.ES3SerializableDictionary`2[TKey,TVal].OnAfterDeserialize ()
This error shows up as soon as I open the scene for editing. Is there an easy way to resolve this or do I need to rollback the project.
For context, I am using the autosave function rather than setting keys manually
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: How do I resolve "Exception: Key count is different to value count"?

Post by Joel »

Hi there,

This would indicate that Unity's asset data has become corrupted when you resolved the conflict (for example, because metadata from two different projects was merged), so you would need to rollback to reverse those changes.

Alternatively you could delete any Easy Save 3 Managers from your scenes and re-add them, and also delete the ES3GlobalReferences asset, but this will invalidate any save data stored with the reference IDs which were in those managers.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Post Reply