Make the Node format more merge-friendly.

Issue #301 open
Bjarke Elias Clauson-Kaas Ørrild
created an issue

Posted by vzlomvl on the Unity forums: https://forum.unity.com/threads/released-odin-inspector-serializer-the-ultimate-workflow-tool.476949/page-10#post-3414452

I have class TreeData:

public class TreeData : ScriptableObject, ISerializationCallbackReceiver
{

   [SerializeField, HideInInspector]
   private SerializationData serializationData;

   [OdinSerialize]
   private List<ActionNode> nodes = new List<ActionNode>();

   void ISerializationCallbackReceiver.OnBeforeSerialize()
   {
      UnitySerializationUtility.SerializeUnityObject(this, ref serializationData);
   }

   void ISerializationCallbackReceiver.OnAfterDeserialize()
   {
       UnitySerializationUtility.DeserializeUnityObject(this, ref serializationData);
   }
}

The average size of nodes array in project is 250-300 elements. If I add in existing tree a new element I get 250 changes of ID. This makes it unreadable changes in commit. For example in Source Tree its look like with:

upload_2018-3-6_13-43-38.png

upload_2018-3-6_13-45-35.png

upload_2018-3-6_13-44-56.png