From 3725a3b0fd755f18a154dce8d5b9b92a3e201866 Mon Sep 17 00:00:00 2001 From: Syntriax Date: Sat, 3 May 2025 20:22:35 +0300 Subject: [PATCH] feat: added preserver class & method to preserve assembly loading --- Engine.Core/Preserver.cs | 10 ++++++++++ Engine.Physics2D/Preserver.cs | 10 ++++++++++ Engine.Systems/Preserver.cs | 10 ++++++++++ Engine/Engine.csproj | 1 + Engine/Preserver.cs | 15 +++++++++++++++ 5 files changed, 46 insertions(+) create mode 100644 Engine.Core/Preserver.cs create mode 100644 Engine.Physics2D/Preserver.cs create mode 100644 Engine.Systems/Preserver.cs create mode 100644 Engine/Preserver.cs diff --git a/Engine.Core/Preserver.cs b/Engine.Core/Preserver.cs new file mode 100644 index 0000000..a7f330e --- /dev/null +++ b/Engine.Core/Preserver.cs @@ -0,0 +1,10 @@ +namespace Syntriax.Engine.Core +{ + // This is pretty much so the assembly gets loaded automatically because + // the builds include the assembly but sometimes doesn't link load it at startup. + // I will hopefully one day fix it and remove this. + public static class Preserver + { + public static void Preserve() { } + } +} diff --git a/Engine.Physics2D/Preserver.cs b/Engine.Physics2D/Preserver.cs new file mode 100644 index 0000000..be2dfe1 --- /dev/null +++ b/Engine.Physics2D/Preserver.cs @@ -0,0 +1,10 @@ +namespace Syntriax.Engine.Physics2D +{ + // This is pretty much so the assembly gets loaded automatically because + // the builds include the assembly but sometimes doesn't link load it at startup. + // I will hopefully one day fix it and remove this. + public static class Preserver + { + public static void Preserve() { } + } +} diff --git a/Engine.Systems/Preserver.cs b/Engine.Systems/Preserver.cs new file mode 100644 index 0000000..dbfab6f --- /dev/null +++ b/Engine.Systems/Preserver.cs @@ -0,0 +1,10 @@ +namespace Syntriax.Engine.Systems +{ + // This is pretty much so the assembly gets loaded automatically because + // the builds include the assembly but sometimes doesn't link load it at startup. + // I will hopefully one day fix it and remove this. + public static class Preserver + { + public static void Preserve() { } + } +} diff --git a/Engine/Engine.csproj b/Engine/Engine.csproj index 2892773..cab99fc 100644 --- a/Engine/Engine.csproj +++ b/Engine/Engine.csproj @@ -4,6 +4,7 @@ net8.0 enable enable + Syntriax.Engine diff --git a/Engine/Preserver.cs b/Engine/Preserver.cs new file mode 100644 index 0000000..a272d7e --- /dev/null +++ b/Engine/Preserver.cs @@ -0,0 +1,15 @@ +namespace Syntriax.Engine +{ + // This is pretty much so the assembly gets loaded automatically because + // the builds include the assembly but sometimes doesn't link load it at startup. + // I will hopefully one day fix it and remove this. + public static class Preserver + { + public static void Preserve() + { + Core.Preserver.Preserve(); + Physics2D.Preserver.Preserve(); + Systems.Preserver.Preserve(); + } + } +}