How do you switch to a template when starting from a sample scene?

Would be great if you wait for a resolution in the discussions here before creating issues too, as long as we’re still trying to figure out here if it is actually a bug or operator error it doesn’t make much sense to open an issue.

Just splinters the discussion in two parts.

by user 103054507105067008

unknown.png

by user 103054507105067008

Your folder is called “BrandNewFolder” but you’re generating something in “Projects/React”. Not sure what I’m looking at here

Once I click pick, made that BrandNewFolder, clicked SelectFolder, the Export component autofills that

by user 103054507105067008

Looks like the confusion is caused by the “Pick” button appending the scene name to the directory path?

Will do, seems a legit issue to me though as all I am doing is

  1. Make new scene
  2. Add Export gameobject
  3. Clicking Pick, making a folder new to generate the project in
  4. The Project Folder input field autofills projects/BrandNewFolder/React or scene name
  5. I click Generate Project
  6. Get error, project seems to be generated in the folder I chose under ‘React’

by user 103054507105067008

Can you make a video?

Just uploading, will share gdrive link to the vid

by user 103054507105067008

https://drive.google.com/file/d/1Ytz1LTcJT_rFLzQTtKHBmdJYsTqAP19C/view?usp=sharing

by user 103054507105067008

Also to your original question (the title of this thread):
You can’t switch an already generated web web project to another template. Templates are for project generation. You can generate a new one from another template.

As templates contain packages etc and your project may use those – e.g. vue components or react components – that’s like saying can I “switch from Unity to Unreal with this button” in regards to web components / HTML etc you may have already built in your web project

Makes sense thanks, hoping to dash a scene across from the Vite + HTML to a Vite + React template at the moment, so I guess I make a new scene with template for React then copy the scene contents over

by user 103054507105067008

The Unity scene is fine! Really just specify a new folder, select the template, press Generate

I really hope I’m doing something silly when generating a project too in the vid

by user 103054507105067008

Differentiate between “unity scene” and “web project” :slightly_smiling_face:

Unity Scene: contains all your Unity objects, things that will be exported as glTF
Web project: contains your HTML+CSS+possibly extra things like web-framework-specific components

Ohhhhh it looks lke you created a new template scriptable object???

unknown.png

I seem to get this error on Generate Project

IOException: The filename, directory name, or volume label syntax is incorrect : 'C:\Unity_Projects\ReboundPlatform\Projects\React\TextMesh Pro\Resources\Sprite C:\Unity_Projects\ReboundPlatform\Projects\React'
—
System.IO.IOException: The filename, directory name, or volume label syntax is incorrect : 'Projects/React/TextMesh Pro/Resources/Sprite Projects/React'

by user 103054507105067008