SerializeExtraInfo() public method

public SerializeExtraInfo ( GraphSerializationContext ctx ) : void
ctx Pathfinding.Serialization.GraphSerializationContext
return void
Exemplo n.º 1
0
		/** Serializes info returned by NavGraph.SerializeExtraInfo */
		static byte[] SerializeGraphExtraInfo (NavGraph graph) {
			var stream = new MemoryStream();
			var wr = new BinaryWriter(stream);
			var ctx = new GraphSerializationContext(wr);

			graph.SerializeExtraInfo(ctx);
			byte[] bytes = stream.ToArray();

#if NETFX_CORE
			wr.Dispose();
#else
			wr.Close();
#endif

			return bytes;
		}