Advertisement
Guest User

Untitled

a guest
Apr 8th, 2020
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.51 KB | None | 0 0
  1. public override void DeserializeReferences (GraphSerializationContext ctx) {
  2.     int count = ctx.reader.ReadInt32();
  3.  
  4.     if (count == -1) {
  5.         connections = null;
  6.     } else {
  7.         connections = new Connection[count];//ArrayPool<Connection>.ClaimWithExactLength (count);
  8.  
  9.         for (int i = 0; i < count; i++) {
  10.             ctx.DeserializeNodeReference();
  11.             connections[i] = new Connection(
  12.                 null,
  13.                 ctx.reader.ReadUInt32(),
  14.                 ctx.meta.version < AstarSerializer.V4_1_0 ? (byte)0xFF : ctx.reader.ReadByte()
  15.                 );
  16.         }
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement