Serialization Confusion

I had a whole lot of confusion this week over Serialization -- I was following the examples of how to save/load data in Unity, which point to BinaryFormatter as the way to go. (Specifically this video, but lots of resources around the net give the same technique.)

Where I ran into trouble is where I wanted to do some custom serialization/deserialization stuff, and found my way to ISerializationCallbackReceiver. What took me a while to figure out was that this only applied to serialization being done by Unity, where BinaryFormatter is part of the System namespace. I was wondering if maybe it was because I was running the serialization on a separate thread, if the [Serializable] attributes were applied correctly, etc. Went down a lot of rabbit holes before I finally realized that BinaryFormatter doesn't go through the Unity serialization pipeline.

Now that I understand it, it's obvious, of course, but it may be worth adding a note on the ISerializationCallbackReceiver documentation that it won't kick in when calling Serialize or Deserialize with BinaryFormatter.