diff --git a/src/framework/components/script/system.js b/src/framework/components/script/system.js index 4a183bac7a9..e3d28709e31 100644 --- a/src/framework/components/script/system.js +++ b/src/framework/components/script/system.js @@ -109,7 +109,7 @@ class ScriptComponentSystem extends ComponentSystem { const scriptName = scriptInstance.__scriptType.__name; order.push(scriptName); - const attributes = { }; + const attributes = entity.script._attributeDataMap?.get(scriptName) || { }; for (const key in scriptInstance.__attributes) { attributes[key] = scriptInstance.__attributes[key]; }