diff --git a/Source/Engine/Core/Math/Int4.cs b/Source/Engine/Core/Math/Int4.cs index 0617f7b71..5328dcc73 100644 --- a/Source/Engine/Core/Math/Int4.cs +++ b/Source/Engine/Core/Math/Int4.cs @@ -12,9 +12,8 @@ namespace FlaxEngine /// Represents a four dimensional mathematical vector (signed integers). /// [Serializable] - [StructLayout(LayoutKind.Sequential, Pack = 4)] [TypeConverter(typeof(TypeConverters.Int4Converter))] - public struct Int4 : IEquatable, IFormattable + partial struct Int4 : IEquatable, IFormattable { private static readonly string _formatString = "X:{0} Y:{1} Z:{2} W:{3}"; @@ -63,26 +62,6 @@ namespace FlaxEngine /// public static readonly Int4 Maximum = new Int4(int.MaxValue); - /// - /// The X component of the vector. - /// - public int X; - - /// - /// The Y component of the vector. - /// - public int Y; - - /// - /// The Z component of the vector. - /// - public int Z; - - /// - /// The W component of the vector. - /// - public int W; - /// /// Initializes a new instance of the struct. /// diff --git a/Source/Engine/Core/Math/Int4.h b/Source/Engine/Core/Math/Int4.h index c8e9eebd8..05b951e62 100644 --- a/Source/Engine/Core/Math/Int4.h +++ b/Source/Engine/Core/Math/Int4.h @@ -13,25 +13,34 @@ struct Vector4; /// /// Four-components vector (32 bit integer type). /// -API_STRUCT(InBuild) struct FLAXENGINE_API Int4 +API_STRUCT() struct FLAXENGINE_API Int4 { +DECLARE_SCRIPTING_TYPE_MINIMAL(Int4); 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; - // Z component - int32 Z; + /// + /// The Z component. + /// + API_FIELD() int32 Z; - // W component - int32 W; + /// + /// The W component. + /// + API_FIELD() int32 W; }; // Raw values