Method OnBeforeSerialize OnBeforeSerialize() Implement this method to receive a callback before Unity serializes your object. Declaration public void OnBeforeSerialize() Implements ISerializationCallbackReceiver.OnBeforeSerialize()