コード例 #1
0
 /** Main serializer function.
  * Serializes all graphs to a byte array
  * A similar function exists in the AstarEditor.cs script to save additional info */
 public byte[] SerializeGraphs(Pathfinding.Serialize.SerializeSettings settings, out uint checksum)
 {
     Pathfinding.Serialize.AstarSerializer sr = new Pathfinding.Serialize.AstarSerializer(this, settings);
     sr.OpenSerialize();
     SerializeGraphsPart(sr);
     byte[] bytes = sr.CloseSerialize();
     checksum = sr.GetChecksum();
     return(bytes);
 }
コード例 #2
0
ファイル: AstarData.cs プロジェクト: artbane/aetherion
        /** Main serializer function.
         * Serializes all graphs to a byte array
         * A similar function exists in the AstarEditor.cs script to save additional info */
        public byte[] SerializeGraphs(Pathfinding.Serialize.SerializeSettings settings, out uint checksum)
        {
            Pathfinding.Serialize.AstarSerializer sr = new Pathfinding.Serialize.AstarSerializer(this, settings);
            sr.OpenSerialize();
            SerializeGraphsPart(sr);
            byte[] bytes = sr.CloseSerialize();
            checksum = sr.GetChecksum();
#if DEBUG
            Debug.Log("Got a whole bunch of data, " + bytes.Length + " bytes");
#endif
            return(bytes);
        }
コード例 #3
0
        /** Main serializer function. */
        public byte[] SerializeGraphs(Pathfinding.Serialize.SerializeSettings settings)
        {
            uint checksum;

            return(SerializeGraphs(settings, out checksum));
        }
コード例 #4
0
 public void SaveCacheData(Pathfinding.Serialize.SerializeSettings settings)
 {
     data_cachedStartup = SerializeGraphs(settings);
     cacheStartup       = true;
 }