diff --git a/Source/Engine/Core/Math/Int2.cs b/Source/Engine/Core/Math/Int2.cs index 0bf38e95f..a063e1bbf 100644 --- a/Source/Engine/Core/Math/Int2.cs +++ b/Source/Engine/Core/Math/Int2.cs @@ -12,9 +12,8 @@ namespace FlaxEngine /// Represents a two dimensional mathematical vector (signed integers). /// [Serializable] - [StructLayout(LayoutKind.Sequential, Pack = 4)] [TypeConverter(typeof(TypeConverters.Int2Converter))] - public struct Int2 : IEquatable, IFormattable + partial struct Int2 : IEquatable, IFormattable { private static readonly string _formatString = "X:{0} Y:{1}"; @@ -53,16 +52,6 @@ namespace FlaxEngine /// public static readonly Int2 Maximum = new Int2(int.MaxValue); - /// - /// The X component of the vector. - /// - public int X; - - /// - /// The Y component of the vector. - /// - public int Y; - /// /// Initializes a new instance of the struct. /// diff --git a/Source/Engine/Core/Math/Int2.h b/Source/Engine/Core/Math/Int2.h index a6038d1b0..c7bcae257 100644 --- a/Source/Engine/Core/Math/Int2.h +++ b/Source/Engine/Core/Math/Int2.h @@ -13,19 +13,24 @@ struct Vector4; /// /// Two-components vector (32 bit integer type). /// -API_STRUCT(InBuild) struct FLAXENGINE_API Int2 +API_STRUCT() struct FLAXENGINE_API Int2 { +DECLARE_SCRIPTING_TYPE_MINIMAL(Int2); public: union { struct { - // X component - int32 X; + /// + /// The X component. + /// + API_FIELD() int32 X; - // Y component - int32 Y; + /// + /// The Y component. + /// + API_FIELD() int32 Y; }; // Raw values