diff --git a/Bindings/Raylib.cs b/Bindings/Raylib.cs
index 0ea317f..edf8bf9 100644
--- a/Bindings/Raylib.cs
+++ b/Bindings/Raylib.cs
@@ -642,14 +642,20 @@ namespace Raylib
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public struct RayHitInfo
{
- public bool hit;
+ public bool hit
+ {
+ get { return Convert.ToBoolean(isHit); }
+ set { isHit = Convert.ToByte(hit); }
+ }
+
+ public byte isHit;
public float distance;
public Vector3 position;
public Vector3 normal;
public RayHitInfo(bool hit, float distance, Vector3 position, Vector3 normal)
{
- this.hit = hit;
+ this.isHit = Convert.ToByte(hit);
this.distance = distance;
this.position = position;
this.normal = normal;
diff --git a/Bindings/Raymath.cs b/Bindings/Raymath.cs
index d5782f2..c0d0064 100644
--- a/Bindings/Raymath.cs
+++ b/Bindings/Raymath.cs
@@ -8,6 +8,7 @@ namespace Raylib
#region Raylib-cs Types
// Vector2 type
+ [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public struct Vector2
{
public float x;
@@ -161,6 +162,7 @@ namespace Raylib
}
// Vector3 type
+ [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public struct Vector3
{
public float x;
@@ -283,6 +285,7 @@ namespace Raylib
}
// Vector4 type
+ [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public struct Vector4
{
public float x;
diff --git a/Test.NetCore/Test.NetCore.csproj b/Test.NetCore/Test.NetCore.csproj
index 12753dc..8adaf80 100644
--- a/Test.NetCore/Test.NetCore.csproj
+++ b/Test.NetCore/Test.NetCore.csproj
@@ -9,6 +9,9 @@
true
+
+ true
+
diff --git a/Test.NetCoreRT/Test.NetCoreRT.csproj b/Test.NetCoreRT/Test.NetCoreRT.csproj
index 19fc8f4..91009d2 100644
--- a/Test.NetCoreRT/Test.NetCoreRT.csproj
+++ b/Test.NetCoreRT/Test.NetCoreRT.csproj
@@ -9,6 +9,9 @@
true
+
+ true
+