mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-11-04 12:51:48 +00:00
Fixed "Save component to edit mode" and also jankily save script data
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user