Fixed "Save component to edit mode" and also jankily save script data

This commit is contained in:
Simon Lübeß
2026-09-14 22:30:10 +02:00
parent d2c6c9a948
commit b927e2e709
3 changed files with 27 additions and 6 deletions
@@ -670,7 +670,7 @@ namespace GlitchyEngine.World
}
}
struct ScriptComponent : IDisposableComponent
struct ScriptComponent : IDisposableComponent, ICopyComponent<ScriptComponent>
{
private String _scriptClassName = null;
@@ -705,5 +705,12 @@ namespace GlitchyEngine.World
delete _scriptClassName;
ReleaseRefAndNullify!(_instance);
}
public static void Copy(ScriptComponent* source, ScriptComponent* target)
{
target.ScriptClassName = source.ScriptClassName;
// TODO: This is just half the work, because we actually have to somehow handle the script instance
}
}
}