From 8737aa73a91c41968086bf60ec33b917095d0451 Mon Sep 17 00:00:00 2001
From: Samuel Jackson Gido <132026917+samgido@users.noreply.github.com>
Date: Sat, 14 Feb 2026 17:42:55 -0600
Subject: [PATCH] Update simple structs to record structs
---
Raylib-cs/types/BoundingBox.cs | 2 +-
Raylib-cs/types/Camera2D.cs | 2 +-
Raylib-cs/types/Camera3D.cs | 2 +-
Raylib-cs/types/Color.cs | 2 +-
Raylib-cs/types/Ray.cs | 4 ++--
Raylib-cs/types/Rectangle.cs | 2 +-
Raylib-cs/types/Transform.cs | 2 +-
7 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/Raylib-cs/types/BoundingBox.cs b/Raylib-cs/types/BoundingBox.cs
index 3e12bc3..f31283a 100644
--- a/Raylib-cs/types/BoundingBox.cs
+++ b/Raylib-cs/types/BoundingBox.cs
@@ -5,7 +5,7 @@ namespace Raylib_cs;
/// Bounding box type
[StructLayout(LayoutKind.Sequential)]
-public partial struct BoundingBox
+public partial record struct BoundingBox
{
///
/// Minimum vertex box-corner
diff --git a/Raylib-cs/types/Camera2D.cs b/Raylib-cs/types/Camera2D.cs
index 7902111..2ff018f 100644
--- a/Raylib-cs/types/Camera2D.cs
+++ b/Raylib-cs/types/Camera2D.cs
@@ -7,7 +7,7 @@ namespace Raylib_cs;
/// Camera2D, defines position/orientation in 2d space
///
[StructLayout(LayoutKind.Sequential)]
-public struct Camera2D
+public record struct Camera2D
{
///
/// Camera offset (displacement from target)
diff --git a/Raylib-cs/types/Camera3D.cs b/Raylib-cs/types/Camera3D.cs
index b9065d9..ef5dd20 100644
--- a/Raylib-cs/types/Camera3D.cs
+++ b/Raylib-cs/types/Camera3D.cs
@@ -28,7 +28,7 @@ public enum CameraProjection
/// Camera3D, defines position/orientation in 3d space
///
[StructLayout(LayoutKind.Sequential)]
-public struct Camera3D
+public record struct Camera3D
{
///
/// Camera position
diff --git a/Raylib-cs/types/Color.cs b/Raylib-cs/types/Color.cs
index da678d1..47f2e92 100644
--- a/Raylib-cs/types/Color.cs
+++ b/Raylib-cs/types/Color.cs
@@ -7,7 +7,7 @@ namespace Raylib_cs;
/// Color type, RGBA (32bit)
///
[StructLayout(LayoutKind.Sequential)]
-public struct Color
+public record struct Color
{
public byte R;
public byte G;
diff --git a/Raylib-cs/types/Ray.cs b/Raylib-cs/types/Ray.cs
index 23b47ee..5cb04ae 100644
--- a/Raylib-cs/types/Ray.cs
+++ b/Raylib-cs/types/Ray.cs
@@ -7,7 +7,7 @@ namespace Raylib_cs;
/// Ray, ray for raycasting
///
[StructLayout(LayoutKind.Sequential)]
-public struct Ray
+public record struct Ray
{
///
/// Ray position (origin)
@@ -30,7 +30,7 @@ public struct Ray
/// Raycast hit information
///
[StructLayout(LayoutKind.Sequential)]
-public struct RayCollision
+public record struct RayCollision
{
///
/// Did the ray hit something?
diff --git a/Raylib-cs/types/Rectangle.cs b/Raylib-cs/types/Rectangle.cs
index d78275b..a744444 100644
--- a/Raylib-cs/types/Rectangle.cs
+++ b/Raylib-cs/types/Rectangle.cs
@@ -7,7 +7,7 @@ namespace Raylib_cs;
/// Rectangle type
///
[StructLayout(LayoutKind.Sequential)]
-public struct Rectangle
+public record struct Rectangle
{
public float X;
public float Y;
diff --git a/Raylib-cs/types/Transform.cs b/Raylib-cs/types/Transform.cs
index 10b15ab..248a9ad 100644
--- a/Raylib-cs/types/Transform.cs
+++ b/Raylib-cs/types/Transform.cs
@@ -7,7 +7,7 @@ namespace Raylib_cs;
/// Transform, vertex transformation data
///
[StructLayout(LayoutKind.Sequential)]
-public struct Transform
+public record struct Transform
{
///
/// Translation