// Reading a 2D vector from the incoming message NetIncomingMessage incomingMessage = GetIncomingMessage(); Vector2 vector = incomingMessage.ReadVector2(); Debug.Log($"Received vector: ({vector.X}, {vector.Y})");
// Sending a 2D vector over the network Vector2 vector = new Vector2(2.5f, 3.8f); NetOutgoingMessage outgoingMessage = GetOutgoingMessage(); outgoingMessage.Write(vector); SendOutgoingMessage(outgoingMessage);In this example, a Vector2 object is created with the X component set to 2.5 and the Y component set to 3.8. The vector is then written to an outgoing message using the Write() method and sent over the network using the SendOutgoingMessage() method. Based on the syntax, it seems that the package library used in these examples is Lidgren.Network.