public static SerializableObjectsContainer FindAllSerializableObjects()
        {
            SerializableObjectsContainer container = new SerializableObjectsContainer();

            foreach (MonoBehaviour component in GameObject.FindObjectsOfType <MonoBehaviour>())
            {
                var    fields = component.GetType().GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance).Where(field => field.IsDefined(typeof(SaveableField), false)).ToArray();
                var    props  = component.GetType().GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance).Where(prop => prop.IsDefined(typeof(SaveableProperty), false)).ToArray();
                string id     = SerializationHelper.GetComponentPath(component);

                if (component is IOnSaveGameMethod)
                {
                    container.OnSaveGameMethods.Add((IOnSaveGameMethod)component);
                }
                if (component is IOnLoadGameMethod)
                {
                    container.OnLoadGameMethods.Add((IOnLoadGameMethod)component);
                }

                foreach (FieldInfo field in fields)
                {
                    FieldSerializationInfo fieldSerializationInfo = FieldToSerializationInfo(field, id, component);
                    if (null != fieldSerializationInfo)
                    {
                        container.SerializableFields.Add(fieldSerializationInfo);
                    }
                }

                foreach (PropertyInfo prop in props)
                {
                    PropertySerializationInfo propertySerializationInfo = PropToSerializationInfo(prop, id, component);
                    if (null != propertySerializationInfo)
                    {
                        container.SerializableProps.Add(propertySerializationInfo);
                    }
                }
            }
            return(container);
        }
 public SceneDataSerializer(SerializableObjectsContainer serializableObjects) : base(serializableObjects)
 {
 }
 public GameDataSerializer(SerializableObjectsContainer serializableObjects)
 {
     this.serializableObjects = serializableObjects;
 }