diff --git a/Source/Engine/Utilities/Utils.cs b/Source/Engine/Utilities/Utils.cs index ba62137cd..ab4fdf17b 100644 --- a/Source/Engine/Utilities/Utils.cs +++ b/Source/Engine/Utilities/Utils.cs @@ -392,6 +392,42 @@ namespace FlaxEngine stream.Write(value.W); } + /// + /// Writes the Int2 to the binary stream. + /// + /// The stream. + /// The value to write. + public static void Write(this BinaryWriter stream, Int2 value) + { + stream.Write(value.X); + stream.Write(value.Y); + } + + /// + /// Writes the Int3 to the binary stream. + /// + /// The stream. + /// The value to write. + public static void Write(this BinaryWriter stream, Int3 value) + { + stream.Write(value.X); + stream.Write(value.Y); + stream.Write(value.Z); + } + + /// + /// Writes the Int4 to the binary stream. + /// + /// The stream. + /// The value to write. + public static void Write(this BinaryWriter stream, Int4 value) + { + stream.Write(value.X); + stream.Write(value.Y); + stream.Write(value.Z); + stream.Write(value.W); + } + /// /// Writes the Quaternion to the binary stream. ///