Esempio n. 1
0
        public object SetObjectData(object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector)
        {
            var we = obj.GetType();

            if (obj is IPersistentUnityObject)
            {
                (obj as IPersistentUnityObject).OnDeserialize(info, context, _assets);
                if (obj is AutoPersistentAssetToken)
                {
                    return((obj as AutoPersistentAssetToken).PreemptiveCreate());
                }
                return(obj);
            }
            else
            {
                return(SimpleUnityStructureSurrogate.GetValue(obj, info, context));
            }
        }
 public object SetObjectData(object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector)
 {
     return(SimpleUnityStructureSurrogate.GetValue(obj, info, context));
 }