diff --git a/Source/Engine/Utilities/Utils.cs b/Source/Engine/Utilities/Utils.cs index a72b4e676..ba62137cd 100644 --- a/Source/Engine/Utilities/Utils.cs +++ b/Source/Engine/Utilities/Utils.cs @@ -240,6 +240,36 @@ namespace FlaxEngine return new Vector4(stream.ReadSingle(), stream.ReadSingle(), stream.ReadSingle(), stream.ReadSingle()); } + /// + /// Reads the Int2 from the binary stream. + /// + /// The stream. + /// The value. + public static Int2 ReadInt2(this BinaryReader stream) + { + return new Int2(stream.ReadInt32(), stream.ReadInt32()); + } + + /// + /// Reads the Int3 from the binary stream. + /// + /// The stream. + /// The value. + public static Int3 ReadInt3(this BinaryReader stream) + { + return new Int3(stream.ReadInt32(), stream.ReadInt32(), stream.ReadInt32()); + } + + /// + /// Reads the Int4 from the binary stream. + /// + /// The stream. + /// The value. + public static Int4 ReadInt4(this BinaryReader stream) + { + return new Int4(stream.ReadInt32(), stream.ReadInt32(), stream.ReadInt32(), stream.ReadInt32()); + } + /// /// Reads the Quaternion from the binary stream. ///