diff --git a/src/editor/components/components/SceneEditTitle/SceneEditTitle.component.jsx b/src/editor/components/components/SceneEditTitle/SceneEditTitle.component.jsx index 0b23d1fd3..1814eff39 100644 --- a/src/editor/components/components/SceneEditTitle/SceneEditTitle.component.jsx +++ b/src/editor/components/components/SceneEditTitle/SceneEditTitle.component.jsx @@ -13,6 +13,12 @@ const SceneEditTitle = ({ sceneData }) => { } }, [sceneData?.sceneTitle, sceneData?.sceneId, sceneId]); + useEffect(() => { + AFRAME.scenes[0].addEventListener('newTitle', (event) => { + setTitle(event.detail.sceneTitle ?? ''); + }); + }, []); + const handleEditClick = () => { const newTitle = prompt('Edit the title:', title); diff --git a/src/json-utils_1.1.js b/src/json-utils_1.1.js index b5a785dc7..215d79b59 100644 --- a/src/json-utils_1.1.js +++ b/src/json-utils_1.1.js @@ -1,6 +1,5 @@ /* global AFRAME, Node */ /* version: 1.0 */ - window.STREET = {}; var assetsUrl; STREET.utils = {};