Method OnBeforeSerialize OnBeforeSerialize() Unity raises a callback to this method before it serializes the asset. Declaration public void OnBeforeSerialize() Implements ISerializationCallbackReceiver.OnBeforeSerialize()