Noob question: Serializing objects with fields indexed by objects

Noob question alert. Thanks for your help.

I’ve created a class and a CustomEditor for it. The class in question, say A, has instances of two subclasses, say B and C.

Now, in class A I’m using a field Dictionary<B,List>, but this doesn’t seem to survive “save scene” or “save project”. The field is private, with [SerializeField]. Am I doomed to not be able to create dictionaries based on objects? Also, Undo.RegisterObject() doesn’t seem save changes to the Dictionary<> field.

Thank you!

You may find this answer to essentially the same question from 2014 interesting.

Super helpful. Thanks!