Multi Scene webAR demo has error

Iā€™m following the Multi Scene webAr demo and everything is working but I keep getting an error saying it canā€™t find my TreeSceneComponents, but I have followed the tutorial step by step, I have my tree-components.js in my components folder, and at the bottom of the tap to place I have below.

In the tutorial video itā€™s at 24 minutes where itā€™s shown how to impliment, I follow to t but not working for me, get error saying canā€™t find TreeSceneComponentsā€¦

const TreeSceneComponents = [
{name: ā€˜tap-placeā€™, val: tapPlaceComponent},
]

export {TreeSceneComponents}

in my trees.tsx file I have this

const TreeScene = withRouter(({match}) => (
<React.Fragment>

<AFrameScene
sceneHtml={require(ā€˜./trees.htmlā€™)}
components={TreeSceneComponents}
/>
</React.Fragment>
))

export {TreeScene}

not sure what Iā€™ve got wrong here, so close but so frustratingā€¦

I think I found the issue, I was missing the declaration at the top of my tree.tsx file. Components now loading!! But now getting a 404 error when trying to access the buttonā€¦

Hey Bill! Glad to hear youā€™ve made some progress. Did you add a new route for the trees scene in react-app.jsx? This is done at ~25 minutes into the tutorial.

Believe it or not the issue was the single quote, as I traced line by line I could see there was difference in the tutorial and my work was a single quote not being the correct typeā€¦ I totaly forgot there was a differnt kind of single quote, I know there is a big difference how some languages treat single and double quote but never sideways singleā€¦ learn something new every day. You can see here the single quotes are not ā€™ they are soon as I switched them it worked. <Route exact path={${base}/trees`} component={TreeScene}/>

1 Like

Glad to hear you figured it out! Thanks for sharing your solution!

Not a problem, sometimes its the simplest things that trip you up. One question for you Evan, is there a way to remove a question, say if I post something and then five minutes later solve it myself, I would like to remove the question as not to waste anyoneā€™s time.

Yep! You can click the three dots on the lower right side of the post, then click the trash icon :slight_smile:

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.