Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by jakejolli · Jun 24, 2016 at 04:38 PM · build3dwebglofflinemultiplatform

Deployable Offline WebGL Solution

We're developing an application which MUST be run through a browser. It has various components which communicate with one another through JavaScript calls, each of which is embedded in the web page along with other content.

The application must be multiplatform, deploying to desktop, iOS and android.

Also, we require that the application have the capability of running locally (as well as from a server).

We don't want to force our users to configure Chrome or IE to allow file access (which in turn will allow WebGL builds to run offline), and we also don't want to force our users to use Firefox.

Is there some other solution to this? Modifying UnityLoader.js to load assets in a different way perhaps?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Bunny83 · Jun 24, 2016 at 07:52 PM

Uhm, i don't quite get the problem i guess. If you open a website from a local folder the website has access to that folder and it's subfolders as long as you're using relative URL paths.

For example i've made this mandelbrot renderer in Unity and deployed it as WebGL into my public dropbox folder. I can run the index.html using the dropbox link, but i'm also able to just open it locally.

However i'm using FireFox only. If it doesn't work in your browser then it's a pure browser specific problem. The assets are packed into binary files. If the browser is blocking those your only options are either using a different browser or try to change the security settings of your browser. A Unity WebGL build consists only of 5 files in total. If the browser is only blocking those when loaded from a local folder it's the browsers fault.

If you want to file a complaint you probably should direct it to your browser manufacturer who is unable to provide a secure local access for a locally hosted webpage. It seems ridiculous to allow the loading and parsing of binary files from an arbitrary internet location but blocking them when loaded from a local folder. How could that be more dangerous? As long as the access is restricted to that folder / subfolder i don't see any problem. Crossdomain restrictions should apply there as well.

To answer your last question: No, i don't think there's a workaround. The Unity engine core works the way it does and it needs the files the way they are.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

51 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Distribute terrain in zones 3 Answers

when build to webGL 0 Answers

WebGL URP Lit shader project settings graphics 0 Answers

Differences in Unity WebGL builds 2018.4->2020.3 0 Answers

How to profile a WebGL app using the unity profiler tool? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges