mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
Scene: Set ScriptEngine Context (Scene) when copying entities
Fixes invalid access when constructors throw exceptions
This commit is contained in:
@@ -133,6 +133,9 @@ namespace GlitchyEngine.World
|
||||
|
||||
if (initializeScripts)
|
||||
{
|
||||
// Set context, so that constructors can correctly reference the scene
|
||||
ScriptEngine.SetContext(target);
|
||||
|
||||
//CopyComponents<NativeScriptComponent>(this, target);
|
||||
|
||||
// Copy ScriptComponents... needs extra handling for the script instances
|
||||
|
||||
Reference in New Issue
Block a user