Modal bootstrap not working in PlayCanvas

I am having an issue, on my local machine my website works the way it should, I have a menu bar down the left side, I click a button and it opens a modal with information but whenever I then import this into playcanvas the side menu shows and reacts the way it should but when I click on the button it doesn’t show my modal and I can’t seem to find a way to fix this.

Any help would be greatly appreciated.
I am using bootstrap to achieve this.


Can you share a public project for people to look at please?

Link below to project.

That’s only the published build. Can you share the project itself and also the steps to reproduce the error please?

How can I share the project itself??

Share a link to the dashboard of the project (if it’s public), if it’s not public then please create a new project that can show the issue that you are having please

Hopefully that works.
When you launch the project along the left side there is a menu bar that slides out when hovered over, I’m trying to figure out why the Profile tab isn’t showing the modal on PlayCanvas but when testing on my computer it all works.
I’m guessing it’s something to do with needing some sort of javascript to link or call the modal but I’m not sure how to do that.

A couple of things to note. Relative paths don’t work in PlayCanvas as the file system you see in the project is virtualised.

I’ve modified the index.html so that relative links are replaced by the URLs/is loaded in another way. eg look at the baileys image URL replacement.

The browser also doesn’t like adding inlined JS code as innerHTML. It doesn’t execute it.

So I’ve moved the JS code from the index.html to the PlayCanvas code after the HTML is added to the page.

Updated forked project:

I’ve also moved all the script tag references in the HTML to be external scripts in the project settings

That’s awesome thanks!

So how do I bring up the PlayCanvas code?
just so I know next time where I should be placing code and linking scripts.

The next thing I’m trying to figure out is the hotspot on the forklift, how can I click it and it brings up a modal or some sort of screen asking a question and with buttons

Sorry, I don’t understand?

You said you moved the JS code from index.html to the PlayCanvas code after the HTML is added to the page?
I don’t understand how you did this or where to find this or how to edit this?

See function, bindEvents in this file

Ahhhhh, I didn’t see that! Thanks. Makes a bit more sense to me now how it’s working.
Not great with JavaScript but trying to learn it.

Is there a simple way I can interact with the hotspot on the forklift? I just want to be able to click the hotspot and a screen appear with a question. Would be great if you could help.

There’s a simple hotspot project here where you can hook up showing/hiding things on the clicking of the hotspot Information hotspots | Learn PlayCanvas

Edit: I noticed that you have another topic on Help with showing UI screens with hotspots . Please keep a single topic per thread over crossposting