Basic save component button

This commit is contained in:
Simon Lübeß
2024-06-23 00:27:20 +02:00
parent cd434d64f9
commit 1b130a4bce
8 changed files with 136 additions and 15 deletions
+2 -2
View File
@@ -216,7 +216,7 @@ namespace GlitchyEngine.World
}
/// Copy POD components that don't need any extra care.
private static void CopyComponent<TComponent>(Entity source, Entity target) where TComponent : struct, new
public static void CopyComponent<TComponent>(Entity source, Entity target) where TComponent : struct, new
{
if (source.TryGetComponent<TComponent>(let sourceComponent))
{
@@ -232,7 +232,7 @@ namespace GlitchyEngine.World
}
/// Copy components that have custom copy methods.
private static void CopyComponent<TComponent>(Entity source, Entity target) where TComponent : struct, new, ICopyComponent<TComponent>
public static void CopyComponent<TComponent>(Entity source, Entity target) where TComponent : struct, new, ICopyComponent<TComponent>
{
if (source.TryGetComponent<TComponent>(let sourceComponent))
{