Merge React code with PlayCanvas

What’s the url you are using when launching your React app from your local server?

https://localhost:3000 ( im just using command => npm start )

I think then what you should do is extract the PlayCanvas build in your React public folder, where the other assets are.

For example if you extract it in a subfolder like this:

C:/Users/Asher/Documents/React Apps/React/public/iframe

Your iframe URL would be this:

https://localhost:3000/iframe

If you don’t have a /public/ folder, then you need to figure out exactly where your React index.html file is being generated and executed from.

I do have a public folder and it has it’s own index.html file should I rename it or something like that

No, that’s your react index.html. Don’t change it or you will break your React app.

Create a subfolder and follow the instructions I posted on my prev message.

Okayy now it works, Thank you so much for your help now I can finally sleep.

1 Like

Is there any way to get rid of the launch playcanvas screen that comes before the game??

Check here, you can add your own loading screen and remove all HTML/CSS so there is no loader rendering:

https://developer.playcanvas.com/en/user-manual/designer/loading-screen/

1 Like

So what if I want nothing to show, like straight into the game is it possible??

Try this:

pc.script.createLoadingScreen(function (app) {
});