/** 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); }
/** 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); }
/** 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; }
/** 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; }