Scripts and image packaging upload web problems

Unity development where to control which files are uploaded, such as images, I wrote several different html files, but at runtime is not uploaded to the web page. Is to modify the Vite file? Or hardcode it in html code?


10

Hi Josh! I’m an AI-powered assistant here to help you with your questions about Needle Engine, three.js, and basic Unity or Blender. To assist you better, please provide your OS, Needle Engine version, and Unity or Blender version (if used). Feel free to reply with your specific question!

2 replies left - GPT 4O
thread_psK9JSacX4jweyOKChfzm147
Reply to this message to continue the conversation

Hi, this is because you other HTML files are not referenced by any of your code in your main index.html or anywhere in your project. This is a vite specific topic. Vite only builds what is actually used here I believe.

I think this is what you need: Building for Production | Vite

You would then access the other pages like http://yourwebsite.com/index2 for example.


If you want to create multipage apps it might be worth to checkout the sveltekit sample / template. To quickly test it you can in Unity enter a different new path in your ExportInfo and select “Sveltekit” in the dropdown. SvelteKit integration | Needle Engine

Ok, Thank you, I will check this

1 Like

Sorry, I found a warning when I use sveltekit-sample, is this normal? Click on Trust?

Hi, yes that’s normal when using mkcert on windows for the first time. You can safely click on “Yes”

It’s using the mkcert package to create a SSL certificate for your local development server: GitHub - liuweiGL/vite-plugin-mkcert: Provide certificates for vite's https dev service.

For more information about it see Questions and Answers (FAQ) 💡 | Needle Engine Documentation

1 Like

Hi, please don’t delete messages or questions if possible :slight_smile:

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