Exemplo n.º 1
0
 public static void WriteDelegate(UnsafeWriter writer, UnityAssetData value)
 {
     writer.Write(value.UnityAssetDataElements.Count);
     foreach (var v in value.UnityAssetDataElements.Values)
     {
         writer.WritePolymorphic(v);
     }
 }
Exemplo n.º 2
0
        public static UnityAssetData ReadDelegate(UnsafeReader reader)
        {
            var assetData = new UnityAssetData();

            var count = reader.ReadInt32();

            for (int i = 0; i < count; i++)
            {
                var v = reader.ReadPolymorphic <IUnityAssetDataElement>();
                assetData.AddDataElement(v);
            }

            return(assetData);
        }