Convert Int2 to generated type.
This commit is contained in:
@@ -12,9 +12,8 @@ namespace FlaxEngine
|
||||
/// Represents a two dimensional mathematical vector (signed integers).
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 4)]
|
||||
[TypeConverter(typeof(TypeConverters.Int2Converter))]
|
||||
public struct Int2 : IEquatable<Int2>, IFormattable
|
||||
partial struct Int2 : IEquatable<Int2>, IFormattable
|
||||
{
|
||||
private static readonly string _formatString = "X:{0} Y:{1}";
|
||||
|
||||
@@ -53,16 +52,6 @@ namespace FlaxEngine
|
||||
/// </summary>
|
||||
public static readonly Int2 Maximum = new Int2(int.MaxValue);
|
||||
|
||||
/// <summary>
|
||||
/// The X component of the vector.
|
||||
/// </summary>
|
||||
public int X;
|
||||
|
||||
/// <summary>
|
||||
/// The Y component of the vector.
|
||||
/// </summary>
|
||||
public int Y;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Int2" /> struct.
|
||||
/// </summary>
|
||||
|
||||
@@ -13,19 +13,24 @@ struct Vector4;
|
||||
/// <summary>
|
||||
/// Two-components vector (32 bit integer type).
|
||||
/// </summary>
|
||||
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;
|
||||
/// <summary>
|
||||
/// The X component.
|
||||
/// </summary>
|
||||
API_FIELD() int32 X;
|
||||
|
||||
// Y component
|
||||
int32 Y;
|
||||
/// <summary>
|
||||
/// The Y component.
|
||||
/// </summary>
|
||||
API_FIELD() int32 Y;
|
||||
};
|
||||
|
||||
// Raw values
|
||||
|
||||
Reference in New Issue
Block a user